// MELT / A Controlling Coil '03.03 // By Tsutomu HIGO E-mail: nj2t-hg@asahi-net.or.jp #version 3.1; global_settings { assumed_gamma 2.2 max_trace_level 4 } camera { location <0, 0, -80> angle 94 look_at <2, 0, 0> } light_source {<0, 0, -80> color <1, 1, 1>} #declare R1 = seed(2); #declare StrengthVal = 0.3; #declare Media = media { emission 0.05 intervals 100 samples 1, 15 confidence 0.9999 variance 1/10 density { spherical turbulence 0.4 color_map { [0.0 color rgb <0, 0, 0>] [0.1 color rgb <0, 0.1, 0.3>] [1 color rgb <0.3, 0.3, 0.3>] } scale <70, 36, 36> } } #macro Dlaring(Nmax, Dia, Rot, Dsphe) #declare Amax = int(pi*Dia/2*3); #declare Ca = array[Amax] #declare Na = 0; #while (Na < Amax) #declare Ca[Na] = 0; #declare Na = Na+1; #end #declare Cp = array[Nmax][3] #declare Ap = 2*pi*rand(R1); #declare Cp[0][0] = Dia/2*cos(Ap); #declare Cp[0][1] = Dia/2*sin(Ap); #declare Cp[0][2] = 0; #declare Np = 1; #while (Np -1) #declare Cp[Np][0] = Dia/2*cos(Ap); #declare Cp[Np][1] = Dia/2*sin(Ap); #declare Cp[Np][2] = Ho*Nt/Ntmax; #declare Ns = -4; #while (Ns < 5) #declare Nns = Ca[mod(Pa+Ns+Amax, Amax)]; #if (pow(Cp[Np][0]-Cp[Nns][0], 2)+pow(Cp[Np][1]-Cp[Nns][1], 2)+pow(Cp[Np][2]-Cp[Nns][2], 2) < 4) #declare Nt = 0; #end #declare Ns = Ns+1; #end #declare Nt = Nt-1; #end #declare Rlength = 0.8+rand(R1)*0*pow(1/(Cp[Np][2]+1),0.2); sphere { Dsphe StrengthVal rotate y*Np/10 translate <-(4-3*pow(Np/Nmax, 3))*Dia, -Cp[Np][2], 0> rotate z*(Cp[Np][2]+1)/3/Dia*180/pi translate z*0.036*Np rotate x*Rot } #declare Ca[mod(Pa, Amax)] = Np; #declare Np = Np+1; #end #end union { blob { threshold 0.1 Dlaring(1500, 10, 0, 2.5) Dlaring(1500, 10, 180, 2.5) pigment {color rgbt <1, 1, 1, 0>} finish { reflection 1 diffuse 0.5 phong 1 brilliance 1 metallic } no_shadow } sphere { 0, 1000 pigment {color rgbf <1, 1, 1, 1>} finish {ambient 0 diffuse 0} interior {media {Media}} hollow } rotate y*-95 rotate z*30 } background {color rgb <0.05, 0, 0.15>}