// Exemplo de arquivo de descricao de cena para POV-ray // Last edited on 2010-03-04 15:44:01 by stolfi // ====================================================================== // CORES E TEXTURAS background{ color rgb < 0.75, 0.80, 0.85 > } #declare tx_grama = texture{ pigment{ color rgb < 0.00, 0.70, 0.00 > } scale 2.0 } // ====================================================================== // DESCRIÇÃO DA CENA #declare raio = 2.000; // Partes da cena: #declare chao = box{ <-20,-20,-1>, <+20,+20,0> } #macro ramo(x1,y1,z1,x2,y2,z2,r) #local tronco1 = cylinder{ < x1, y1, z1>, < x2, y2, z2>, r texture { pigment { color rgb <0.64, 0.16, 0.16> } } } object{tronco1} #end #declare dinheiro = box{ <0.6,1.5,0>, <1, 1.65, 0.10>} //centro <0.8, 2.575, 0.05> #macro arvore(n,x1,y1,z1,x2,y2,z2,r) #if (n=0) object{ chao translate < 0,0,-2 > texture{ tx_grama } } #else union{ object{ramo(x1,y1,z1,x2,y2,z2,r)} object{arvore(n-1,x2,y2,z2,x2,y2+0.5,z2+1,r-0.1)} object{arvore(n-1,x2,y2,z2,x2,y2-0.7,z2+1,r-0.1)} object{box{ <0,y2,z2>, <0.5, y2+0.15, z2+0.2> texture { pigment { color rgb <0.00, 1.00, 0.00> } }} } } #end #end #include "eixos.inc" // Aqui está a cena, finalmente: union{ object{ arvore(4,0,0,-3,0,0,1,0.4) } } #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 1.00 >; #declare raio_cena = 6.0; #declare dir_camera = < 14.00, 7.00, 4.00 >; #declare dist_camera = 16.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)