// Exemplo de arquivo de descricao de ANIMAÇÃO para POV-ray // Last edited on 2009-09-24 15:40:22 by stolfi #declare tx_vidro = texture{ pigment{ color rgb < 0.85, 0.95, 1.00 > filter 0.70 } finish{ diffuse 0.03 reflection 0 ambient 0.02 specular 0.25 roughness 0.005 } } #declare tx_vermelho= texture{ pigment{ color rgb < 1.00, 0, 0 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_branco= texture{ pigment{ color rgb < 1, 1, 1 > } finish{ diffuse 0.9 ambient 0.1 } } #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 camera { location < -1.00, 10.00, 2.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 < 2.00, -5.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 * < +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 > } #declare raio = 2.000; // Um parãmetro que varia {+1, 00, -1, 00, +1}: #declare ctt = sin(2*pi*tt); #declare att = cos(2*pi*tt); // Um parâmetro que varia {00, +1, 00, -1, 00}: #declare stt = 45*sin(3*2*pi*tt); #declare logo = union{ box { <0,0,0>,<4,2,1> texture{tx_vidro}} text{ ttf "arial.ttf" "REGIS" 0.5, 0 texture{tx_vermelho}} box { <0,0.3,0.3> , <2,1.7,0.5> rotate -stt*y translate<3.5,0,0> texture{tx_branco}} box { <0,0.3,0.3> , <-2,1.7,0.5> rotate stt*y translate<0.5,0,0> texture{tx_branco}} } #declare tinta_A = texture { pigment { color rgb < 0.55 + 0.45*ctt, 0.80, 0.55 - 0.5*ctt > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_B = texture { pigment { color rgb < 1.00, 0.80, 0.10 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } // Aqui está a cena, finalmente: union { object { logo } translate 3*ctt*x translate 3*att*z } #end // gera o quadro correspondente ao instante dado {clock}: quadro(clock)