// Exemplo de arquivo de descricao de cena para POV-ray // Last edited on 2010-03-04 15:44:01 by stolfi // ====================================================================== // CORES E TEXTURAS #include "textures.inc" 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.9 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 } #declare tx_marrom = texture{ pigment{ color rgb < 0.92, 0.51, 0.23 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_marrom_claro = texture{ pigment{ color rgb < 1.02, 0.71, 0.23 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_verde = //35,142,35 texture{ pigment{ color rgb < 0.35, 1.42, 0.35 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_verde_escuro = //47,79,47 texture{ pigment{ color rgb < 0.47,0.79, 0.47 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } // ====================================================================== // DESCRIÇÃO DA CENA #declare raio = 2.000; #declare raioPequeno = 1.000; // Partes da cena: #declare orelha = cone{ <0, 0, 0>, 0.15 <0, 0, 0.5>, 0 } #declare cabeca = sphere{ <0, 0, 0>, 1 } #declare tronco = cone{ <0, 0, 0>, 1.7 <0, 0, 5>, 0.3 } #declare articulacao = sphere{ <0, 0, 0>, 0.25 } #declare membro = cylinder{ <0, 0, 0>, <0, 0, 1>, 0.20 } #declare rabo = cone{ <0, 0, 0>, 0.3 <0, 0, 2.5>, 0.1 } #declare chao = box{ <-20,-20,-1>, <+20,+20,0> } #include "eixos.inc" // Aqui está a cena, finalmente: //90,0,90,0,-70,-45,110,-70,-45,110 #macro corpo(A,B,C,D,E,F,G,H,I,J) union { object{ orelha translate < -0.5,0,5.8 > texture{ tx_marrom } } object{ orelha translate < 0.5,0,5.8 > texture{ tx_marrom } } object{ cabeca translate < 0,0,5 > texture{ tx_marrom } } object{ tronco texture{ tx_marrom } } object{ braco(A) rotate B *z translate < 0.80,0,3.5 > texture{ tx_marrom } } object{ braco(C) rotate D *z rotate 180 *y translate < -0.80,0,3.5 > texture{ tx_marrom } } object{ rabo rotate 45 *x translate < 0,-1,1.5 > texture{ tx_marrom } } object{ perna(F,G) scale <2,2,2> rotate E *x translate <-1,0,0> texture{ tx_marrom } } object{ perna(I,J) scale <2,2,2> rotate H *x translate <1,0,0> texture{ tx_marrom } } } scale <0.5,0.5,0.5> translate < 0,0,3 > #end #macro mao() union { object{ articulacao texture{ tx_marrom_claro } } object{ membro scale <1,1,0.5> rotate 90 *y translate < 0.25,0,0 > texture{ tx_marrom } } } #end #macro antebraco() union { object{ articulacao texture{ tx_marrom_claro } } object{ membro scale <1,1,1> rotate 90 *y translate < 0.25,0,0 > texture{ tx_marrom } } } #end #macro coxa() union { object{ articulacao texture{ tx_marrom_claro } } object{ membro scale <1,1,1.5> rotate -90 *x translate < 0,0.25,0> texture{ tx_marrom } } } #end #macro canela() union { object{ articulacao texture{ tx_marrom_claro } } object{ membro scale <1,1,1> rotate -90 *x translate < 0,0.25,0 > texture{ tx_marrom } } } #end #macro pe() union { object{ articulacao texture{ tx_marrom_claro } } object{ membro scale <0.8,0.8,0.8> rotate -90 *x translate < 0,0.25,0 > texture{ tx_marrom } } } #end #macro braco(A) union { object{ antebraco() translate < -(0.25+1),0,0 > } object{ mao() rotate A *y } } translate < (0.25+1),0,0 > #end #macro perna(A,B) union { object{ coxa() translate < 0,-(0.25+1.5),0 > } object{ subperna(B) rotate A *x } } translate < 0,(0.25+1.5),0 > #end #macro subperna(B) union { object{ canela() translate < 0,-(1.25),0 > } object{ pe() rotate B *x translate < 0,0,0 > } } translate < 0,1.25,0 > #end object{ corpo(90,0,90,0,-70,-45,110,-70,-45,110) translate < 0,0,0 > } object{ corpo(-45,30,45,30,-70,0,110,-70,0,110) translate < -3,0,0 > } //object{ subperna(90) } object{ eixos(3.00) } object{ chao translate < 0,0,-5 > texture{ tx_verde_escuro } } #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 2.00 >; #declare raio_cena = 15.0; #declare dir_camera = < -2.00, 4.00, 3.00 >; #declare dist_camera = 7.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)