// EAT / A Ring Collapsing '03.01 // by Tsutomu HIGO E-mail: nj2t-hg@asahi-net.or.jp #version 3.5; global_settings { max_trace_level 4 assumed_gamma 2.2 } light_source {<0, 100, 0> color <0.7, 0.7, 1>} camera { location <0, -10, -28> angle 90 look_at <0.5, 1.0, 0.0> } #declare R1 = seed(7); #declare Media = media { emission 0.05 intervals 10 samples 1, 10 confidence 0.9999 variance 1/100 density { spherical turbulence 1 color_map { [0.0 color rgbt <0, 0, 0, 1>] [0.5 color rgbt <0, 0.5, 1, 0.9>] [0.6 color rgb <1, 1, 1>] } scale 20 } } #declare R1 = seed(7); #macro Meshsquare (Pmaxx, Pmaxy, Pmaxz, Rrand, Rsize) #declare Cp = array[Pmaxx][Pmaxy][Pmaxz][3] #declare Xp = 0; #while (Xp < Pmaxx) #declare Yp = 0; #while (Yp < Pmaxy) #declare Zp = 0; #while (Zp < Pmaxz) #declare Cp[Xp][Yp][Zp][0] = Xp/Pmaxx-0.5; #declare Cp[Xp][Yp][Zp][1] = Yp/Pmaxx-0.5*Pmaxy/Pmaxx; #declare Cp[Xp][Yp][Zp][2] = Zp/Pmaxx-0.5*Pmaxz/Pmaxx; #declare Zp = Zp+1; #end #declare Yp = Yp+1; #end #declare Xp = Xp+1; #end union { #declare Xp = 0; #while (Xp < Pmaxx) #declare Yp = 0; #while (Yp < Pmaxy) #declare Zp = 0; #while (Zp < Pmaxz) #declare R = sqrt(pow(Cp[Xp][Yp][Zp][0], 2)+pow(Cp[Xp][Yp][Zp][2], 2)+0.0000001); #if (pow(Cp[Xp][Yp][Zp][0]-0.375/R*Cp[Xp][Yp][Zp][0], 2) +pow(Cp[Xp][Yp][Zp][2]-0.375/R*Cp[Xp][Yp][Zp][2], 2)+pow(Cp[Xp][Yp][Zp][1], 2) < 0.125*0.125) #if (pow(Cp[Xp][Yp][Zp][0]-0.375, 2)+pow(Cp[Xp][Yp][Zp][2], 2) > 0.05-0.02*rand(R1)) sphere { Rsize/Pmaxx*2} #else #if (rand(R1) > 0.9) sphere { Rsize/Pmaxx*2} #end #end #end #declare Zp = Zp+1; #end #declare Yp = Yp+1; #end #declare Xp = Xp+1; #end pigment {color rgb <1, 1, 1>} finish { reflection 0.9 phong 1 brilliance 0.2 ambient 0.3 } no_shadow translate <0.5/Pmaxx, 0.5/Pmaxx, 0> scale 40 rotate y*60 } #end union { sphere {0, 50 pigment {color rgbf<1, 1, 1, 1>} finish {ambient 0 diffuse 0} interior {media {Media}} rotate z*90 translate <-2, -5, 0> hollow translate x*(0.375*40) } object {Meshsquare (100, 25, 100, 0.8, 0.25)} }