// Exemplo de arquivo de descricao de cena para POV-ray // Last edited on 2003-09-04 15:25:26 by stolfi // ====================================================================== // CÂMERA camera { location < -25.00, .00, 0.00 > // Posição do observador. right -1*x // Largura RELATIVA da imagem. up 0.75*y // Altura RELATIVA da imagem. sky z // Qual direção é "para cima"? look_at < 0.00, 0.00, 0.00 > // Para onde a câmera está apontando. } // Nota: os parâmetros "right" e "up" devem ter a mesma proporção // que os parâmetros ${WIDTH} e ${HEIGHT} no Makefile. // ====================================================================== // FONTES DE LUZ light_source { 10 * < -50.0, -30.0, +50.0 > // Posição da lâmpada. color rgb 1.2 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source { 10 * < +50.0, -10.0, +10.0 > // Posição da lâmpada. color rgb 0.8 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } // ====================================================================== // DESCRIÇÃO DA CENA 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.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_B = texture { pigment { color rgb < 1.00, 0.80, 0.5 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_C = texture { pigment { color rgb < 0.80, 1.00, 0.5 > } finish { diffuse 0.5 specular 0.5 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} }