// GATHER / Fall '03.08 // By Tsutomu HIGO URL: http://www.asahi-net.or.jp/~nj2t-hg/ #version 3.5; global_settings { assumed_gamma 2.2 max_trace_level 3 } light_source {<0, 30, -10> color <1, 1, 1>} camera { location <0.5, 0.8, -3> angle 32 look_at <-0.36, 0.4, 0> } #declare R1 = seed(7); #declare StrengthVal = 0.3; #macro Meshsquare (Pmaxx, Pmaxy, Rrand, Rsize) //initialize the coordinates #declare Cp = array[Pmaxx][Pmaxy][3] #declare Xp = 0; #while (Xp < Pmaxx) #declare Yp = 0; #while (Yp < Pmaxy) #declare Cp[Xp][Yp][2] = 5*(Xp-Rrand/2+Rrand*rand(R1))/Pmaxx-0.5; #declare Cp[Xp][Yp][0] = (Yp-Rrand/2+Rrand*rand(R1))/Pmaxx-0.5*Pmaxy/Pmaxx; #declare L = pow(3*Cp[Xp][Yp][0], 2); #declare Cp[Xp][Yp][1] = (Cp[Xp][Yp][2]+0.5+Rrand/2*5/Pmaxx)/(Cp[Xp][Yp][2]+0.5+Rrand/2*5/Pmaxx+0.3); #declare Cp[Xp][Yp][2] = Cp[Xp][Yp][2]-L; #declare Yp = Yp+1; #end #declare Xp = Xp+1; #end union { blob { threshold 0.3 #declare Xp = 0; #while (Xp < Pmaxx) #declare Yp = 0; #while (Yp < Pmaxy) sphere { Rsize/Pmaxx StrengthVal} #if (Yp > 0) cylinder { 0.5*Rsize/Pmaxx StrengthVal} #end #if (Xp > 0) cylinder { 0.5*Rsize/Pmaxx StrengthVal} #end #declare Yp = Yp+1; #end #declare Xp = Xp+1; #end pigment {color rgb <0.5, 0.8, 1>} finish { ambient 0.3 reflection 1 phong 2 brilliance 1 } no_shadow translate <0.5/Pmaxx, 0.5/Pmaxx, 0> } } #end Meshsquare (120, 120, 1, 2) sphere {<0, 0.6, -0.6> 0.1 pigment {color rgb <1, 0.9, 0.9>} finish { ambient 0.6 reflection 0.7 phong 2 brilliance 1 } no_shadow }