/* -------------------------- Entry: 0032 WWW: http:// Title: Anti-shadow color Author: Robert Alzinger Three spheres of glass with nine cavities with 27 spheres of glass, the shadow and the ANTI-SHADOW with color ---------------------------*/ /* for the Fractal Raytracing Contest */ /* Date: 2004-04-17 */ global_settings { photons { spacing 0.017 //0,017 is ok for dispersion and 0.003 with out gather 5,15 } } #declare SteelBlue = color red 0.14 green 0.42 blue 0.56; camera {location <0,10,10> direction z*1 look_at <0,5,0>} light_source {<0,15,-16> rgb 1 *2} plane {y,0 pigment {color SteelBlue } translate <0,-0,0>} #declare a=1; #declare b=tan(pi*30/180); // 0.577350269 #declare c= sqrt((a*a)+(b*b)); // 1.154700538 #declare d=1/(1+c); // 0.464101615 #macro threeball() union { sphere {<0,0,0>,1 } sphere {<0,0,0>,1 translate <2,0,0> rotate z*60} sphere {<0,0,0>,1 translate <2,0,0> } rotate x*0 rotate y*0 translate <-1.0,-b,0 > } #end #macro threeballball() union { object {threeball() scale d} object {threeball() scale d rotate z*180 translate <2,0,0> rotate z*60} object {threeball() scale d translate <2,0,0> } translate <-1,-b,0 > scale d } #end #macro mainobject() union { difference { sphere {<0,0,0>,1} object {threeball() scale d} } object {threeballball()} } #end #macro three() union { object {mainobject() scale 1} object {mainobject() scale 1 rotate z*180 translate <2,0,0> rotate z*60} object {mainobject() scale 1 translate <2,0,0> } translate <-1,-b,0 > scale d } #end object {three() scale 4.8 scale <1.4,1,1> translate <0,4.5,-10> pigment { rgb 1 filter 1} interior {ior 1.2 dispersion 1.05 dispersion_samples 30} photons { target .6 refraction on reflection off } }