/* -------------------------- Entry: 0003 WWW: http:// Title: Anti-shadow Author: Robert Alzinger Three spheres of glass with nine cavities with 27 spheres of glass, the shadow and the ANTI-SHADOW ---------------------------*/ /* for the Fractal Raytracing Contest */ /* Date: 2004-04-08 */ global_settings { photons { spacing 0.0028 //0,028 is ok for dispersion and 0.003 with out gather 5,15 } } #declare SteelBlue = color red 0.137255 green 0.419608 blue 0.556863; camera {location <0,10,10> direction z*1 look_at <0,5,0>} light_source {<0,15,-16> rgb 1} 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 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 } }