default { pigment { rgb 1 } } background { rgb 1 } #declare z_scaler=0.7; #declare h1=sin(radians(60)); #declare h2=h1*2; #declare clipper=box{<-1,-1,-1>,<1,1,1> } #declare shape_1=cylinder { <-2,0,0>,<2,0,0>,0.2 } #declare shape_2=torus { 2,0.2 rotate -x*90 clipped_by { plane {-y,0} } } #macro ArrowHead(a,Lvl) #declare tmp = object { a scale <0.5,0.5,z_scaler> rotate z*240 translate <-1.5,h1,0> } #declare b=union{ object { tmp } object { a scale <0.5,0.5,z_scaler> translate y*h2} object { tmp rotate y*180} } #undef a #undef tmp #if(Lvl>1) ArrowHead(b,Lvl-1) #else object { b } #end #end #declare c1 = camera { location <0,h1,-4> look_at y*h2 } #declare c2 = camera { location <2,2,-4> look_at <-0.5,2*h1,0> angle 20 } camera { c2 } light_source { <10,10,-10> rgb 1 shadowless } //Number of objects = (number of objects in base shape)*(3^recursion_level) //shape_1: Recursion_level = 10 : 59049 objects. ArrowHead( shape_1 , 7 )