// Exemplo de arquivo de descricao de cena para POV-ray // Last edited on 2009-03-09 18:44:03 by stolfi // ====================================================================== // CÂMERA camera{ location < 0, 0, 23.00 > // Posição do observador. right -0.64*x // Largura RELATIVA da imagem. up 0.48*y // Altura RELATIVA da imagem. sky y // Qual direção é "para cima"? look_at < 0.00, 0.00, 0.00 > // Para onde a câmera está apontando. } // Nota: os parâmetros "right" e "up" devem ter a mesma proporção // que os parâmetros ${WIDTH} e ${HEIGHT} no Makefile. // ====================================================================== // FONTES DE LUZ light_source{ 10 * < 0.0, +30.0, +50.0 > // Posição da lâmpada. color rgb 1.0 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source{ 10 * < +50.0, -10.0, +10.0 > // Posição da lâmpada. color rgb 0.5 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } // ====================================================================== // EIXOS DE COORDENADAS #macro eixo(ponta,cor,nome) union{ sphere{ <0,0,0>, 0.02 } cylinder{ <0,0,0>, 0.91*ponta, 0.02 } cone{ 0.90*ponta, 0.06, ponta, 0.00 } texture{ pigment{ color rgb cor } finish{ ambient 0.5 diffuse 0.5 } } } #end #macro eixos(tamanho) union{ object{ eixo( , <1.0,0.2,0.2>, "X") } object{ eixo( <0,tamanho,0>, <0.0,0.8,0.0>, "Y") } object{ eixo( <0,0,tamanho>, <0.3,0.3,1.0>, "Z") } } #end // ====================================================================== // CORES E TEXTURAS background{ color rgb < 0.75, 0.80, 0.85 > } #declare tx_madeira = texture{ pigment{ color rgb < 1, 0, 0 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_ferro = texture{ pigment{ color rgb < 0.6, 0.6, 0.6 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 reflection 0.1*< 0.6, 0.6, 0.6 > } } #declare tx_plastico = texture{ pigment{ color rgb < 1,1,1 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 reflection 0.1*< 0.6, 0.6, 0.6 > } } #declare tx_fosca = texture{ pigment{ color rgb < 0.92,0.8,0.51 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_vidro = texture{ pigment{ color rgb < 0.97, 0.98, 1.00 > filter 0.20 } finish{ diffuse 0.03 reflection 0.25 ambient 0.02 specular 0.25 roughness 0.005 } } // ====================================================================== // DESCRIÇÃO DA CENA //------- OBJETOS ----------- #macro galinha( a1, a2, a31, a41, a51, a32, a42, a52, a61, a71, a81, a62, a72, a82, a63, a73, a83, a64, a74, a84, a65, a75, a85, a66, a76, a86 ) union { sphere { < 0,0,0 >, 2 scale < 0,0.3,0.3 > texture{ tx_fosca } } object{ pescoco( a1,a2 ) translate < -0.9,0.2,0 > } object{ asa( a31,a41,a51 ) translate < -0.5,0.3,0.6 > } object{ asa( a32,a42,a51 ) translate < -0.5,0.3,0.6 > scale < 1,1,-1 > } object{ perna( a61,a71,a81 ) translate < -1,-0.3,0.3 > } object{ perna( a62,a72,a82 ) translate < -1,-0.3,0.3 > scale < 1,1,-1 > } object{ perna( a63,a73,a83 ) translate < 0,-0.3,0.4 > } object{ perna( a64,a74,a84 ) translate < 0,-0.3,0.4 > scale < 1,1,-1 > } object{ perna( a65,a75,a85 ) translate < 1,-0.3,0.3 > } object{ perna( a66,a76,a86 ) translate < 1,-0.3,0.3 > scale < 1,1,-1 > } } #end #macro pescoco( a_pesco, a_cabe ) union { cylinder { < 0,0,0 >, < 0,2,0 >, 0.1 texture{ tx_fosca } } sphere { < 0,0,0 >, 0.1 texture{ tx_fosca } } object { cabeca( a_cabe ) translate < 0,1.9,0 > } } rotate a_pesco*z #end #macro cabeca( a_cabe ) union { sphere { < 0,0,0 >, 0.3 texture{ tx_fosca } } cone { < 0,0,0 > 0.1, < -0.15,0,0 > 0 translate < -0.29,0,0 > } } rotate a_cabe*y #end #macro asa( a_asa, a_asa_s, a_asa_s_s ) union { box { < 0,0,0 >, < 1.3,-0.6,0.01 > texture{ tx_fosca } } object { asa_sub( a_asa_s, a_asa_s_s ) translate < 1.3,-0.6,0 > } } rotate a_asa*z rotate -a_asa*x #end #macro asa_sub( a_asa_s, a_asa_s_s ) union { box { < 0,0,0 >, < -0.8,-0.3,0.01 > texture{ tx_fosca } } object { asa_sub_sub( a_asa_s_s ) translate < -0.8,-0.3,0 >} } rotate a_asa_s*z #end #macro asa_sub_sub( a_asa_s_s ) union { box { < 0,0,0 >, < 0.4,-0.2,0.01 > texture{ tx_fosca } } } rotate -a_asa_s_s*z #end #macro perna( a_coxa, a_canela, a_pe ) union { cylinder { < 0,0,0 >, < 0,-1,0 >, 0.1 texture{ tx_fosca } } object { perna_sub( a_canela, a_pe ) translate < 0,-1,0 > } } rotate a_coxa*z #end #macro perna_sub( a_canela, a_pe ) union { cylinder { < 0,0,0 >, < 0,-0.7,0 >, 0.1 texture{ tx_fosca } } object { perna_sub_sub( a_pe ) translate < 0,-0.7,0 > } } rotate -a_canela*z #end #macro perna_sub_sub( a_pe ) union { box { < 0,0,0 >, < 0.8,-0.08,0.2 > texture{ tx_fosca } translate < -0.5,0,0 > } } rotate a_pe*z #end //------- CENA ----------- union { object{ eixos(4.00) } object{ galinha( 45,30, 30,30,30,45,45,35, 30,60,10,-30,-60,10, 45,70,20,-45,-70,20, 35,65,15,-35,-65,15 ) translate < 0,0,0 > } object{ galinha( 60,15, 40,35,45,35,50,30, 45,70,20,-45,-70,20, -30,-60,10,30,60,10, 30,60,10,-30,-60,10 ) translate < 5,0,0 > } object{ galinha( 30,45, 35,40,50,30,30,45, 35,65,15,-35,-65,15, 45,70,20,-30,-60,10, -30,-60,10,45,70,20 ) translate < -5,0,0 > } rotate 45*y //rotate -45*x }