#version unofficial mlpov 0.83; #include "rand.inc" global_settings { radiosity { // rather high radiosity settings, but I think not high enough ;-) pretrace_start 0.08 // start pretrace at this size pretrace_end 0.01 // end pretrace at this size count 1600 // higher -> higher quality (1..1600) [35] nearest_count 10 // higher -> higher quality (1..10) [5] error_bound .1 // higher -> smoother, less accurate [1.8] recursion_limit 1 // how much interreflections are calculated (1..5+) [3] low_error_factor .1 // reduce error_bound during last pretrace step gray_threshold 0.0 // increase for weakening colors (0..1) [0] minimum_reuse .005 // reuse of old radiosity samples [0.015] brightness 5 // brightness of radiosity effects (0..1) [1] adc_bailout .01/15 //normal on // take surface normals into account [off] //media on // take media into account [off] //save_file "file_name" // save radiosity data //load_file "file_name" // load saved radiosity data //always_sample off // turn sampling in final trace off [on] //max_sample 1.0 // maximum brightness of samples } max_trace_level 50 } camera {location <0,2.5,-4> look_at <0,1.25,0>} #declare Z=seed(3454555454524); #macro Baum(Var,Max,LCY,RCY) // LCY = Length of cylinders, RCY = Radius of cylinders and half of Radius of the spheres #if (Var < Max) // start objects used recursive object{ cylinder {<0,0,0>,<0,LCY,0>,RCY} pigment {aoi <0,2.5,-4>} finish {phong .75 ambient 2 diffuse 0 reflection {0,1} conserve_energy metallic} interior {ior 1.5}} object{ sphere {<0,0,0>,2*RCY} pigment {aoi <0,2.5,-4>} finish {phong .75 ambient 2 diffuse 0 reflection {0,1} conserve_energy metallic} interior {ior 1.5}} // end objects used recursive union {Baum(Var+1,Max,LCY/1.4,RCY/1.5) rotate z*RRand(25,55,Z) translate <0,LCY,0>} union {Baum(Var+1,Max,LCY/1.4,RCY/1.5) rotate z*RRand(25,45,Z) rotate y*72 translate <0,LCY,0>} union {Baum(Var+1,Max,LCY/1.4,RCY/1.5) rotate z*RRand(25,45,Z) rotate y*144 translate <0,LCY,0>} union {Baum(Var+1,Max,LCY/1.4,RCY/1.5) rotate z*RRand(25,45,Z) rotate y*216 translate <0,LCY,0>} union {Baum(Var+1,Max,LCY/1.4,RCY/1.5) rotate z*RRand(25,45,Z) rotate y*288 translate <0,LCY,0>} #end #if (Var = 1) plane { y, -2*RCY pigment {color rgb .5} finish {ambient 0 reflection .2}} sphere{0,.25 pigment {rgb <1,0,0>} finish {ambient 0} translate <.75,.25-2*RCY,0>} #end #end Baum(1,6,1,.045) // increase Max=6 to get more branches