// Exemplo de arquivo de descricao de ANIMAÇÃO para POV-ray // Last edited on 2009-09-24 15:40:22 by stolfi #macro quadro(tt) // Gera o quadro do filme (cena, luzes e câmera) // para o instante {tt} -- um número real entre 0 e 1. // ====================================================================== // CÂMERA #include "eixos.inc" #include "retalho.inc" camera { location < 60.00, 2, 40.00 > // Posição do observador. right -1.00*x // Largura RELATIVA da imagem. up 0.75*y // Altura RELATIVA da imagem. sky z // Qual direção é "para cima"? look_at < 0.00, 0, 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 * < +50.0, +30.0, +50.0 > // Posição da lâmpada. color rgb 1.2 * < 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.8 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } // ====================================================================== // DESCRIÇÃO DA CENA //background{ color rgb < 0.75, 0.80, 0.85 > } background{ color rgb < 0.75, 0.80, 0.85 > } #declare marrom = texture{ pigment{ color rgb < 0.9, 0.2, 0.2 > } finish{ diffuse 0.8 ambient 0.01 specular 0.5 roughness 0.005 } } #declare tx_bandeira = texture{ uv_mapping pigment{ image_map{jpeg "bandeira.jpg" } translate<-1/2,-1/2,0> rotate -90*z translate<1/2,1/2,0> } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_grito = texture{ pigment{ image_map{jpeg "grito.jpg" } translate<-1/2,-1/2,0> rotate -90*z } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005} } #declare lol = texture{ pigment{ color rgb < 0.0, 0.5, 0.8 > } finish{ diffuse 0.8 ambient 0.01 specular 0.5 roughness 0.005 } } #declare verde = texture{ pigment{ color rgb < 0.15, 0.90, 0.15 > } finish{ diffuse 0.8 ambient 0.01 specular 0.5 roughness 0.005 } } #declare tx_plastico = texture{ pigment{ color rgb < 0.80, 0.90, 0.90 > } finish{ diffuse 0.8 ambient 0.01 specular 0.5 roughness 0.005 } } #declare tx_plastico2 = texture{ pigment{ color rgb < 0.90, 0.90, 0.90 > } 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_fosca2 = texture{ pigment{ color rgb < 0.50, 0.50, 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.05 } } #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 raio = 10.000; // Um parãmetro que varia {+1, 00, -1, 00, +1}: #declare ctt = cos(4*pi*tt); // Um parâmetro que varia {00, +1, 00, -1, 00}: #declare stt = sin(4*pi*tt); #local p11 = < 0,0,0>; #local p21 = < 0,1.2,0.2>; #local p31 = < 0,2.2,0.2>; #local p41 = < 0,3,0>; #local p12 = < 0,0.2,1>; #local p22 = < 0,1.1,1>; #local p32 = < 0,2.1,1>; #local p42 = < 0,2.8,1>; #local p13 = < 0,0.2,2>; #local p23 = < 0,1.1,2>; #local p33 = < 0,2.1,2>; #local p43 = < 0,2.8,2>; #local p14 = < 0,0,3>; #local p24 = < 0,1.2,2.8>; #local p34 = < 0,2.2,2.8>; #local p44 = < 0,3,3>; #declare predio = box{<-4,-4,0> <4,4,20>} #declare haste = cylinder{<0,0,0><0,0,2> 0.1} #declare bandeira = union{ object{retalho(p11,p12,p13,p14,p21,p22,p23,p24,p31,p32,p33,p34,p41,p42,p43,p44,0.0001, tx_vidro, tx_bandeira) scale<1, 4/3, 1> translate<0,0,22> } object{haste texture{tx_plastico} translate<0,0,20>} } #declare bandeira2 = union{ object{retalho(p11,p12,p13,p14,p21,p22,p23,p24,p31,p32,p33,p34,p41,p42,p43,p44,0.0001, tx_vidro, tx_grito) scale<1, 1, 1> translate<0,0,22> } object{haste texture{tx_plastico} translate<0,0,20>} } #declare banner = box{<-0.5,-0.5,0> <0.5,0.5,0.1> texture{tx_grito}} object{predio texture{tx_fosca2}} object{banner rotate -90*y scale<6,6,6> translate <4.1,0,16> } object{bandeira translate<0,4,0>} object{bandeira translate<0,-4,0>} //object{chassi(1,1,stt)} //object{coxas{1,1,1}} //object{chassi(0,0,0)} object{ eixos(100.00) } /*difference { union { object { bola } object { pino } } object { furo } rotate 360*tt*z translate -1.5*ctt*y }*/ #end // gera o quadro correspondente ao instante dado {clock}: quadro(clock)