/*========================================================= Anelli borromei Metodi e Modelli Matematici Gian Marco Todesco, ottobre 2007 http://archinet.uniroma3.it/mate/metodi/2007 =========================================================*/ #include "colors.inc" #include "textures.inc" camera { location <0,1,-4> right x*image_width/image_height look_at y angle 40 } default { finish { ambient 0.3 diffuse 0.5 } } light_source { <3,10,-10> color 1 } sky_sphere { pigment { gradient y color_map { [0.0 color rgb <0.7,0.7,1.0>] [1.0 color blue 0.5] } } } plane { y,0 pigment { ForestGreen } } #macro Tree(L) #local Scale = 0.6; #local Length = 0.8; // tronco cone {0, 0.1, y*Length, 0.1*Scale texture {Yellow_Pine}} #if(L=0) // alla fine c'e' una bacca verde sphere {y*Length,0.15 pigment {LimeGreen}} #else // altrimenti 5 sotto-alberi #local I = 0; #local N = 5; #while(I