#include "colors.inc" camera { location <-1, 2, -6> look_at <0, 1.2, 0> angle 28 } sky_sphere { pigment { gradient y color_map { [0.0 color blue 0.6] [1.0 color rgb 1] } } } light_source { <-30, 30, -30> White } light_source { <-20, 50, -40> White } plane { y, 0 texture { pigment {checker color Green color <0,.6,0> scale 0.15} finish {reflection 0.2} } } // ---------------------------------------- #declare TreeBark = texture { pigment {color rgb <.8, .4, 0>} normal {radial 1 scale .05 frequency 30 turbulence .1} } #declare Leaf = texture { pigment {color rgb <.2, .6, .2>} } #macro Tree(levels, tseed) #if ((levels + rand(tseed) * 2)> 5) cylinder { <0, 0, 0>, <0, .1, 0>, .5 texture {Leaf} } cylinder {0, .00001, .00001 texture {Leaf}} #else cylinder { <0, 0, 0>, <0, 1, 0>, .1 texture {TreeBark} } union { union { Tree(levels + 1, tseed) rotate x*+50 } union { Tree(levels + 1, tseed) rotate x*-50 } union { Tree(levels + 1, tseed) rotate z*+50 } union { Tree(levels + 1, tseed) rotate z*-50 } scale .6 translate y*1 } #end #end Tree(0, seed(2130))