#include "stdinc.inc" camera{ location <15,15,10> look_at <5,0,5> //angle 15 } background{White} light_source{<10,10,-10> color White} #declare S=seed(0); #difference{ box{0,<10,-0.5,10>} #declare j=0; #while(j<10) #declare i=0; #while(i<10) #declare R=RRand(0,1,S); #union{ cylinder{0,0.3*z,.05} cylinder{1.01*z,0.7*z,.05} sphere{0.3*z, .05} sphere{0.7*z, .05} intersection{ torus{0.2,0.05 translate 0.5*z} plane{x,0}} #if(R<0.5) rotate 180*z #end translate i*x translate j*z pigment{SlateBlue} finish{ambient 0.1} } #union{ cylinder{0,0.3*z,.05} cylinder{1.01*z,0.7*z,.05} sphere{0.3*z, .05} sphere{0.7*z, .05} intersection{ torus{0.2,0.05 translate 0.5*z} plane{x,0}} rotate 90*y #if(R<0.5) rotate 180*x #end translate i*x translate j*z pigment{SlateBlue} finish{ambient 0.1} } #declare i=i+1; #end #declare j=j+1; #end pigment{Green} finish{ambient 0.1} bounded_by{box{-1,<11,.01,11>}} } sphere{0,1 pigment{Gray80} finish{ambient 0.4 reflection 0.2} translate <5,1,5>}