// 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, -6> // Posição do observador. location <15, 3, 5> //location <-15, -8, 1> //location <0, -8, 8> //location <0, 1, 10> //location <0, -1, 6> //location <0, 1, 10> //location <0 , 10, 0> //location < 6.00, 2.00, 2.00 > // Posição do observador. right -0.9*x // Largura RELATIVA da imagem. up 0.60*y // Altura RELATIVA da imagem. sky y // Qual direção é "para cima"? //look_at < 0.00, 0.50, 1.00 > // Para onde a câmera está apontando. look_at < 0,0,0 > // 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 * < +50.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. //} //light_source{ // 10 * < -50.0, -10.0, +10.0 > // Posição da lâmpada. // color rgb 0.7 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. //} light_source{ < 4, 4, 4> // Posição da lâmpada. color rgb < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source{ < 4, 4, -4> // Posição da lâmpada. color rgb < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source{ < -4, 4, 4> // Posição da lâmpada. color rgb < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source{ < -4, 4, -4> // Posição da lâmpada. color rgb < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source{ < 0, -10, 0> // Posição da lâmpada. color rgb < 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 #declare tx_art = texture { pigment { color rgb <0.75, 0.55, 0.15> } } #declare tx_peca = texture { pigment { color rgb <0.55, 0.45, 0.10> } } #declare tx_bico = texture { pigment { color rgb <0.85, 0.65, 0.20> } } background{ color rgb < 0.75, 0.80, 0.85 > } // ====================================================================== // DESCRIÇÃO DA CENA #macro galinha(ang_pesc, ang_cab, ang_pern1, ang_pern2, ang_pern3, ang_pern4, ang_pern5, ang_pern6, ang_pernp1, ang_pernp2, ang_pernp3, ang_pernp4, ang_pernp5, ang_pernp6, ang_pe1, ang_pe2, ang_pe3, ang_pe4, ang_pe5, ang_pe6, ang_asa1, ang_asa2, ang_asinha1, ang_asinha2) union { sphere { <0, 0, 0>, 1 texture {tx_peca} scale <1.2, 1, 2> } object{pescoco(ang_cab) rotate translate <0, 0.65, 1.5>} object{perna(ang_pernp1, ang_pe1) rotate translate <1.2, -0.2, 0>} object{perna(ang_pernp2, ang_pe2) rotate scale <-1, 1, 1> translate <-1.2, -0.2, 0>} object{perna(ang_pernp3, ang_pe3) rotate translate <1, -0.2, -0.85>} object{perna(ang_pernp4, ang_pe4) rotate scale <-1, 1, 1> translate <-1, -0.2, -0.85>} object{perna(ang_pernp5, ang_pe5) rotate translate <0.7, -0.2, -1.7>} object{perna(ang_pernp6, ang_pe6) rotate scale <-1, 1, 1> translate <-0.7, -0.2, -1.7>} object{asa(ang_asinha1) rotate <0, ang_asa1, 0> rotate <-40, 0, 30> translate <0.9, 0.5, 0.4> } object{asa(ang_asinha2) rotate <0, ang_asa2, 0> rotate <-40, 0, 30> translate <0.9, 0.5, 0.4> scale <-1, 1, 1>} } #end #macro cabeca() union { sphere { <0, 0.5, 0>, 0.5 texture {tx_peca} } sphere { <0, 0, 0>, 0.22 texture {tx_art} } cone { <0, 0.5, 1>, 0 <0, 0.5, 0.4>, 0.15 texture {tx_bico} } } #end #macro pescoco(alfa) union { sphere { 0, 0.3 texture {tx_art} } cylinder { <0, 0, 0>, <0, 1.2, 0>, 0.2 texture {tx_peca}} object {cabeca() rotate translate <0, 1.2, 0>} } #end #macro perna(alfa, beta) union { sphere { 0, 0.3 texture {tx_art} } cone { 0, 0.27, < 0.2, -0.6, 0>, 0.16 texture {tx_peca}} object {pernape(beta) rotate translate < 0.2, -0.6, 0>} } #end #macro pernape(ang) union { sphere { 0, 0.2 texture {tx_art} } cylinder { <0, 0, 0>, <0, -0.7, 0>, 0.1 texture {tx_peca}} object{ pe() rotate translate <0, -0.7, 0>} } #end #macro pe() union { sphere { 0, 0.11 texture {tx_art} } box{<0.2, -0.1, 0.4>, <-0.2, -0.09, -0.1> texture {tx_peca}} } #end #macro asinha() union { sphere { 0, 0.1 texture {tx_art} scale <1, 3, 0.7> } cone { 0, 0.098 <1, 0, 0>, 0 texture {tx_peca} scale <1, 3, 0.7> } } #end #macro asa(ang) union { sphere { 0, 0.3 texture {tx_art} scale <1, 3, 0.7> } cone { 0, 0.29 <1.7, 0, 0>, 0.1 texture {tx_peca} scale <1, 3, 0.7> } object{ asinha() rotate <0, ang, 0> translate <1.7, 0, 0>} scale <0.8, 0.65, 0.8> } #end union { //eixos(4) object {galinha(10, 10, 20, 20, 20, 20, 20, 20, -20, -20, -20, -20, -20, -20, 15, -15, 20, 30, 10, 0, 10, 10, 155, 155) translate <0, -2, -1.3> } object {galinha(20, -10, 15, 30, 30, 15, 10, 30, -10, -40, -10, -40, -10, -40, -15, 25, 40, -30, -10, 5, 80, 80, 175, 175) translate <-4, 1, 3> } object {galinha(-10, -10, -20, -20, -20, -20, -20, -20, 20, 20, 20, 20, 20, 20, -15, 15, -20, -30, -10, 0, 0, 0, 0, 0) translate <-3, 1, -4> } }