// Last edited on 2005-01-06 00:18:58 by stolfi // Processed by remove-cam-lights #include "colors.inc" #include "stones.inc" #include "metals.inc" #include "woods.inc" background{ color rgb < 0.75, 0.80, 0.85 > } #macro vertice(a,b,c) sphere { , 0.5 pigment {color Green} } #end #declare filho1 = 1; #declare filho2 = 2; #declare filho3 = 3; #declare tamanho = 3; #macro arvore(n,a,b,c,filho) #local la = a; #local lb = b; #local lc = c; #local lfilho = filho; #local nl = tamanho; union { #if (n = 0) object{vertice(la+1,lb+1,lc+1)} #if (filho = filho1) cylinder{ ,, 0.1 pigment {color Black} } #else #if (filho = filho2) cylinder{ ,, 0.1 pigment {color Black} } #else cylinder{ ,, 0.1 pigment {color Black} } #end #end #else object {arvore(n-1,la-0.5,lb-0.5,lc-0.5,filho1)} object {arvore(n-1,la+0.5,lb-0.5,lc+0.5,filho2)} object {arvore(n-1,la+1.5,lb-0.5,lc-0.5,filho3)} #end object{vertice(la+1,lb+1,lc+1)} #if (lfilho > 0) #if (lfilho = filho1) cylinder{ ,, 0.1 pigment {color Black} } #else #if (filho = filho2) cylinder{ ,, 0.1 pigment {color Black} } #else cylinder{ ,, 0.1 pigment {color Black} } #end #end #end } #end object {arvore(tamanho,10,10,10,0) translate <-2,-2.5,-2.3>} cylinder { <10,7,6>,<10,0,6>, 1.3 pigment {color <0.6,0.4,0.2>} } #include "camlight.inc" camlight(<10,5,0>,<0,0,30>,1.00,y,1.0)