// SCC3 entry // A recursivly defined tree light_source { <-1, 5 > 1.8 } // What ray trace would be complete without a checkered plane plane { y, -2 pigment { checker rgb 0.25 rgb 1 } } // branch(recursion_depth,rotate_angle) macro #macro b(d,r) #if(d<12) union { // branch tapers cone { 0 0.1/(0.9-(d/26)) y 0.1 pigment {rgb 1} } // calls to sub-branches b (d + 1, 17) b (d + 1, 130) b (d + 1, 278) // don't scale/rotate the 0th branch (trunk) #if(d>0) scale .9-(d/26) rotate<35-d*2,r> translate y #end } #end #end // the tree base (0th call of the branch macro, and translate into position) object { b (0, 0) translate < 0, -2, 5 > }