// 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 1 ambient 1 } } #declare tx_espelho = texture{ pigment{ color rgb < 0.50, 0.50, 0.50 > } finish{ diffuse 0.2 reflection 0.7*< 0.50, 0.50, 0.50 > 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: #declare tronco = cone{<0,0,0>,2,<0,0,10>,0 pigment{ color rgb < 0.50, 0.30, 0.00 > }} #macro bGalho(r,c) cylinder{<0,0,0>,<0,c,0>,r pigment{ color rgb < 0.50, 0.30, 0.00 > }} #end #declare dinheiro = box{<0,0,0>,<0.5,1,0.1> pigment{ color rgb < 0.10, 0.30, 0.00 > }} #macro galho(n, r, c) #if (n=0) union{ object{bGalho(r,c) } object{dinheiro translate<-0.25+(r/2),c,-0.1+r/2>} } #else union{ object{bGalho(r,c) } object{galho(n-1,r/1.2,c/1.2 ) rotate<-10,-10,40>translate<0,c,0>} object{galho(n-1,r/1.2,c/1.2) rotate<-10,-10,-40> translate<0,c,0> } } #end #end #declare pino = cylinder{ < 0, 0,0>, < +2.00, 0, 0 >, 0.15 texture{ tx_espelho } } #declare paInf= union{ box{<0,0,-0.05>,<2,3,0.05>} cylinder{< 1, 3,-0.05>,<1,3,0.05>,1.2 } texture{ tx_espelho } } #declare paSup= union{ box{<0,0,-0.05>,<2,3.8,0.05>} box{<0,3.7,0.0>,<2,3.8,-0.15>} texture{ tx_espelho } } #macro pegador (rot) union{ object {pino} object {paInf} object {paSup rotate} } #end #include "eixos.inc" // cena union{ //object{ eixos(3.00) } object{tronco} object{galho(3,0.2,3) translate<0,0,8>} object{galho(5,0.25,3.5) rotate<0,0,180> translate<0,0,8.5>} object{galho(2,0.1,2) rotate<0,0,-100> translate<0,0,7>} object{galho(4,0.15,2.3) rotate<0,0,-90> translate<0,0,4.5>} object{galho(2,0.2,2.7) rotate<0,0,90> translate<0,0,4.5>} } #include "camlight.inc" #declare centro_cena = < 1.00, 0.00, 6.00 >; #declare raio_cena = 15.0; #declare dir_camera = < 14.00, 7.00, 8.00 >; //#declare dir_camera = < 1.00, 4.00, 0.00 >; #declare dist_camera = 100.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)