// 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_plastico = texture{ pigment{ color rgb < 0.10, 0.80, 1.00 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_fosca = texture{ pigment{ color rgb < 1.00, 0.80, 0.10 > } finish{ diffuse 0.5 ambient 0.5 } } #declare tx_grana = texture{ pigment{ color rgb < 0.15, 1.25, 0.65 > } finish{ diffuse 1.5 ambient 0.1 } } #declare tx_espelho = texture{ pigment{ color rgb < 1.00, 0.85, 0.30 > } finish{ diffuse 0.2 reflection 0.7*< 1.00, 0.85, 0.30 > ambient 0.1 } } #declare tx_vidro = texture{ pigment{ color rgb < 0.85, 0.95, 1.00 > filter 0.70 } finish{ diffuse 0.03 reflection 0.25 ambient 0.02 specular 0.25 roughness 0.005 } } #declare tx_xadrez = texture{ pigment{ checker color rgb < 0.10, 0.32, 0.60 >, color rgb < 1.00, 0.97, 0.90 > } finish{ diffuse 0.9 ambient 0.1 } scale 2.0 } // ====================================================================== // DESCRIÇÃO DA CENA #declare raio = 2.000; // Partes da cena: //Um tronco #macro tronco (TAMANHO,COR) union{ cone { <0,0,0>, TAMANHO/2, <0,0,TAMANHO*TAMANHO>,0 texture {pigment{ color rgb < 1.00, (0.85-0.05*COR), (0.20-0.02*COR) > } finish{ diffuse (0.6+0.10*COR) ambient (0.1+0.05*COR) }} } box { < -TAMANHO/4, -0.01, TAMANHO*TAMANHO-0.1 >, < TAMANHO/4, 0.01, TAMANHO*TAMANHO+TAMANHO> texture {pigment{ color rgb < 0.35/COR, 0.45*COR, 0.4 > }} } } #end //A arvore #macro arvore (PROFUNDIDADE,COR) union{ #if ( PROFUNDIDADE = 0 ) object{ tronco(1,COR+0.7) } #else object{ tronco(PROFUNDIDADE+1,COR) } object{ arvore(PROFUNDIDADE-1,COR+1.3) rotate<0,30,0> translate< PROFUNDIDADE/6 , 0 , 2*PROFUNDIDADE*PROFUNDIDADE/3> } object{ arvore(PROFUNDIDADE-1,COR+1.3) rotate<0,-30,0> translate< -PROFUNDIDADE/6 , 0 , 2*PROFUNDIDADE*PROFUNDIDADE/3> } object{ arvore(PROFUNDIDADE-1,COR+0.5) rotate<0,60,0> translate< PROFUNDIDADE/3 , 0 , PROFUNDIDADE*PROFUNDIDADE/3> } object{ arvore(PROFUNDIDADE-1,COR+0.5) rotate<0,-60,0> translate< -PROFUNDIDADE/3 , 0 , PROFUNDIDADE*PROFUNDIDADE/3> } #end } #end #include "eixos.inc" // Aqui está a cena, finalmente: union{ object{ arvore(4,0) translate<0,-14,0> } object{ arvore(3,0) translate<0,11,0> } object{ arvore(2,0) translate<0,25,0> } } #include "camlight.inc" #declare centro_cena = < 0.00, 5.00, 15.00 >; #declare raio_cena = 50; #declare dir_camera = < 1.00, 2.50, 1.00 >; #declare dist_camera = 50; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)