// 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 } } #macro cabeca() union{ sphere {<0,0,0>,1 pigment{ color rgb<0.7,0.7,0.7> }} //orelhas cone{<0,0,1>,0.25,<0,0,3>,0 pigment{ color rgb<0.7,0.7,0.7> }rotate<20,0,0>} cone{<0,0,1>,0.25,<0,0,3>,0 pigment{ color rgb<0.7,0.7,0.7> }rotate<-20,0,0>} //olhos cylinder{<1,0,0>,<1.1,0,0>,0.1 pigment{ color rgb<1,0,0>}rotate<0,-10,20>} cylinder{<1,0,0>,<1.1,0,0>,0.1 pigment{ color rgb<1,0,0>}rotate<0,-10,-20>} //dentes box{<1,-0.1,0>,<1.25,0.1,0> pigment{ color rgb<1,1,1>}rotate<0,30,7>} box{<1,-0.1,0>,<1.25,0.1,0> pigment{ color rgb<1,1,1>}rotate<0,30,-7>} //pescoço cylinder{<0,0,-1>,<0,0,-1.5>,0.35 pigment{ color rgb<1,1,1>}} translate(<0,0,1.5>) scale<1.3,1.3,1.3> } #end #macro bota() union{ cylinder{<0,0,0>,<0,0,-2.5>,0.5 pigment{ color rgb<0,0,0>}} box{<0,-0.5,-2.2><2,0.5,-2.5>} } #end #macro mao() union{ sphere{<0,-0.4,0>,0.4 pigment{ color rgb<0.5,0.5,0.5>}} } #end #macro perna(yBota) union{ cylinder{<0,0,0.5>,<0,0,-2.5>,0.4 pigment{ color rgb<0.7,0.7,0.7>}} object{bota()rotate<0,yBota,0>translate<0,0,-2.5>} } #end #macro antebraco(xMao,zMao) union{ cylinder{<0,0,0>,<0,-2.3,0>,0.3 pigment{ color rgb<0.7,0.7,0.7>}} object{mao()rotatetranslate<0,-2.3,0>} scale<0.7,0.7,0.7> } #end #macro braco(yAnte,xMao,zMao) union{ cylinder{<0,0.5,0>,<0,-2.3,0>,0.4 pigment{ color rgb<0.7,0.7,0.7>}} object{antebraco(xMao,zMao)rotate<0,0,yAnte>translate<0,-2.3,0>} } #end #macro coelho(xCab,yCab, xBraD,zBraD, xPerD,yPerD, yAnteD, xMaoD,zMaoD, yBotaD, xBraE,zBraE, xPerE,yPerE, yAnteE, xMaoE,zMaoE, yBotaE) union{ sphere {<0,0,0>,2 pigment{ color rgb<0.9,0.9,0.9> }} object{cabeca()rotatetranslate<0,0,2>} object{braco(yAnteD, xMaoD,zMaoD,)rotatetranslate<0,-2,0.5>} object{braco(yAnteE, xMaoE,zMaoE,)rotatescale<1,-1,1>translate<0,2,0.5>} object{perna(yBotaD)rotatetranslate<0,-0.7,-1.5>} object{perna(yBotaE)scale<1,-1,1>rotatetranslate<0,0.7,-1.5>} } #end #include "eixos.inc" // cena union{ //object{ eixos(3.00) } // object{cabeca()scale<2,2,2>} object{coelho(0,0,30,20,0,0,0,0,0,0, -50,20,0,0,0,0,0,0,)} } #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 0.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)