// 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 1.9*< 14.00, 7.00, 3.50 > // Posição do observador. right -0.45*x // Largura RELATIVA da imagem. up 0.60*y // Altura RELATIVA da imagem. sky z // Qual direção é "para cima"? look_at < 0.00, 0.00, 1.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 * < +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. } // ====================================================================== // 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_chao = texture{ pigment{ color rgb < 0.60, 0.60, 0.60 > } 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_cadeira = texture{ pigment{ color rgb < 0.50, 0.30, 0.50 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_mesa = texture{ pigment{ color rgb < 1.00, 0.80, 1.00 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_espelho = texture{ pigment{ color rgb < 1.00, 0.90, 0.70 > } finish{ diffuse 0.1 reflection 0.8*< 1.00, 0.90, 0.70 > ambient 0.1 } } #declare tx_vidro = texture{ pigment{ color rgb < 0.97, 0.98, 1.00 > filter 0.70 } finish{ diffuse 0.03 reflection 0.25 ambient 0.02 specular 0.25 roughness 0.005 } } #declare tx_quadro = texture{ pigment{ image_map { jpeg "imagem.jpg" } scale <4, 3, 1> } finish{ diffuse 0.8 ambient 0.2} } // ====================================================================== // DESCRIÇÃO DA CENA #declare raio = 2.000; // Partes da cena: #declare junta = sphere { <0,0,0>, 0.15 texture{tx_fosca} } //DECLARE PARTES (UNIONS) //MACROS #macro pe() box{ < 0.5,0.8,0.2 >, < 0,0,0 > texture{tx_fosca}} #end #macro pe_canela(ang_pe) union { object{junta} cylinder{< 0,0,0 >,< 0,0,-1 >, 0.1 texture{tx_fosca}} object{junta translate <0,0,-1.1>} object{ pe() rotate ang_pe*x translate <-0.25,-0.25,-1.3> } } #end #macro perna(ang_joelho, ang_pe) union { object{junta} cylinder{ < 0,0,0 >, < 0,0,-1 >, 0.1 texture{tx_fosca}} object{ pe_canela(ang_pe) rotate ang_joelho*x translate <0,0,-1> } } #end #macro galinha( ang_ponta_asa_esq, ang_ponta_asa_dir, ang_asa_esq, ang_asa_dir, ang_cabeca, ang_pescoco, ang_perna_diant_esq, ang_perna_diant_dir, ang_perna_central_esq, ang_perna_central_dir, ang_perna_traseiro_esq, ang_perna_traseiro_dir, ang_joelho_diant_esq, ang_joelho_diant_dir, ang_joelho_central_esq, ang_joelho_central_dir, ang_joelho_traseiro_esq, ang_joelho_traseiro_dir, ang_pe_diant_esq, ang_pe_diant_dir, ang_pe_central_esq, ang_pe_central_dir, ang_pe_traseiro_esq, ang_pe_traseiro_dir, ) union { sphere{ < 0,0,0 >, 1.8 scale <0.4,0,0.4> texture{ tx_fosca }} //pernas centrais object{ perna(ang_joelho_central_dir, ang_pe_central_dir) rotate ang_perna_central_dir*x translate <0.8,0,-0.1> } object{ perna(ang_joelho_central_esq, ang_pe_central_esq) rotate ang_perna_central_esq*x translate <0.8,0,-0.1> scale <-1,1,1>} //pernas frontais object{ perna(ang_joelho_diant_dir, ang_pe_diant_dir) rotate ang_perna_diant_dir*x translate <0.8,0.95,-0.1> } object{ perna(ang_joelho_diant_esq, ang_pe_diant_esq) rotate ang_perna_diant_esq*x translate <0.8,0.95,-0.1> scale <-1,1,1>} //pernas traseiras object{ perna(ang_joelho_traseiro_dir, ang_pe_traseiro_dir) rotate ang_perna_traseiro_dir*x translate <0.8,-0.95,-0.1> } object{ perna(ang_joelho_traseiro_esq, ang_pe_traseiro_esq) rotate ang_perna_traseiro_esq*x translate <0.8,-0.95,-0.1> scale <-1,1,1>} //pescoco + cabeca object{ cabeca_pescoco(ang_cabeca) rotate ang_pescoco*x translate <0.1,1.8,-0.1> } //asas object{ asa(ang_ponta_asa_dir) rotate ang_asa_dir*y translate <0.5,-0.4,0.5> } object{ asa(ang_ponta_asa_esq) rotate ang_asa_esq*y translate <0.5,-0.4,0.5> scale <-1,1,1>} } #end #macro cabeca() union { sphere{ < 0,0,0 >, 0.3 texture{ tx_fosca }} cone{ < 0,0.15,0 >, 0 < 0,0,0 >, 0.1 translate <0.15,0.3,0.10> texture{tx_fosca}} } #end #macro cabeca_pescoco(ang_cabeca) union { object{junta} cylinder{ < 0,0,0 >, < 0.1,0.1,1.4 >, 0.1 texture{tx_fosca}} object{ cabeca() rotate ang_cabeca*x translate <0,0,1.35> } } #end #macro ponta_asa() union { box{ < 0.8,1,0.1 >, <0,0,0> texture{ tx_fosca }} } #end #macro asa(ang_ponta_asa) union { box{ < 1.2,1.4,0.1 >, <0,0,0> texture{ tx_fosca }} object{ ponta_asa() rotate ang_ponta_asa*y translate <1.25,0.2,0> } } #end // Aqui está a cena, finalmente: union{ object{ eixos(3.00) } object { galinha(18,10, -20,-20, -10,-15, -20,-20,-20, -20,-20,-20, 30,30,30, 30,30,30, -10,-10,-10, -10,-10,-10, ) translate <0,0,0> } object { galinha(-30,60, -30,-20, -10,-15, -20,-45,-20, -20,-20,-60, -10,-30,-30, 30,45,30, -10,-18,-35, -18,-10,-22, ) translate <0,4,0> } object { galinha(-5,45, -30,-40, 10,15, 20,-20,-20, -20,-20,-20, 30,12,30, 70,30,13, -10,65,-10, 10,-10,-10, ) translate <0,-4,0> } //perna(70, 50) }