// Last edited on DATE TIME by USER // Processed by remove-cam-lights background{ color rgb < 0.75, 0.80, 0.85 > } #declare tinta_A = texture { pigment { color rgb < 0.10, 0.80, 1.00 > } finish { diffuse 0.8 specular 0.2 roughness 0.005 ambient 0.1 } } #declare tinta_B = texture { pigment { color rgb < 1.00, 0.80, 0.5 > } finish { diffuse 0.8 specular 0.2 roughness 0.005 ambient 0.1 } } #declare tinta_C = texture { pigment { color rgb < 0.80, 1.00, 0.5 > } finish { diffuse 0.8 specular 0.2 roughness 0.005 ambient 0.1 } } #declare bola = sphere { <0,0,0>, 0.5 texture{tinta_A} } #macro linha(i,ang,nivel) #local iant = i - 1; #if (i=1) #local angant = 0; #else #local angant = 360/(pow(nivel,iant)); #end #debug concat("linha=> ang: ",str(ang,3,0)," i: ",str(i,1,0)," iant: ",str(iant,1,0)," angant: ",str(angant,3,0),"\n") cylinder { <0,0,0>, <-3,0,-3>, 0.2 texture{tinta_B} rotate (angant+ang)*z translate <-iant*3,0,-iant*3> } #end #macro arvore3d(nivel,profundidade) #local i = 1; #local ang = 360/nivel; #if (nivel = 1) union { object{bola} #while (i} cylinder { <0,0,-(i-1)*3>, <0,0,-i*3>, 0.2 texture {tinta_B} } #declare i = i + 1; #end } #else union { object{bola} #while (i rotate ang*z} object{linha(i,ang,nivel)} #declare ang = ang + 360/(pow(nivel,i)); #else #declare i = i + 1; #declare ang = 360/(pow(nivel,i)); #end #end } #end #end #declare eixo = cylinder { <0,0,0>, <0,0,50>, 0.1 } union { object {arvore3d(2,3)} object {eixo} object{eixo rotate -90*x } object{eixo rotate 90*y} } #include "camlight.inc" camlight(<0,0,0>,<-25.00,.00,0.00>,1.00,z,1.0)