// Last edited on 2005-01-06 00:21:42 by stolfi // Processed by remove-cam-lights background{ color rgb < 0.75, 0.80, 0.85 > } #declare tinta_no = texture { pigment { color rgb < 0.90, 0.90, 0.10 > } finish { diffuse 0.8 specular 0.2 roughness 0.005 ambient 0.1 } } #declare tinta_aresta = texture { pigment { color rgb < 0.20, 0.80, 0.00 > } finish { diffuse 0.8 specular 0.2 roughness 0.005 ambient 0.1 } } #declare comp_regua = 50; #declare thick_regua = 0.5; #declare tinta_regua = texture { pigment { color rgb < 0.40, 0.20, 0.00 > } finish { diffuse 0.8 specular 0.2 roughness 0.005 ambient 0.1 } } #declare regua = union { cylinder { <0,0,0> thick_regua texture { tinta_regua } } cylinder { <0,0,0> <0, comp_regua, 0> thick_regua texture { tinta_regua } } cylinder { <0,0,0> <0, 0, comp_regua> thick_regua texture { tinta_regua } } } #declare tam_no = 2.0; #declare tam_aresta = 5.0; #declare abertura_aresta = 3.0; #declare rot = 90.0; #macro arvore(n) union { sphere { < 0.0, 0.0, 0.0 > tam_no texture { tinta_no } } #if (n > 0) #local k = (n * n) + abertura_aresta; cylinder { < 0.0, 0.0, 0.0, > < 0.0, -k, -tam_aresta> tam_no / 3 texture { tinta_aresta } } cylinder { < 0.0, 0.0, 0.0, > < 0.0, k, -tam_aresta> tam_no / 3 texture { tinta_aresta } } object { arvore(n-1) rotate rot*z translate < 0.0, -k, -tam_aresta> } object { arvore(n-1) rotate rot*z translate < 0.0, k, -tam_aresta> } #end } #end #declare a = 7; object { arvore(a) } object { plane { z, -((a * tam_aresta) + tam_no) texture { pigment { color rgb <0.50, 0.25, 0.00> } finish { ambient 0.1 diffuse 0.9 } scale 15 } } } #include "camlight.inc" camlight(<30,40,0>,<90,80,120>,1.00,z,1.0)