// 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 camera { location < 8.00, 4.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 < 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 * < +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. } // ====================================================================== // CORES E TEXTURAS background{ color rgb < 0.75, 0.80, 0.85 > } #declare tx_preto = texture{ pigment{ color rgb < 0.00, 0.00, 0.00 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_rosa = texture{ pigment{ color rgb < 1, 0.4, 0.8 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_vermelho = texture{ pigment{ color rgb < 1, 0, 0 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_pele = texture{ pigment{ color rgb < 1, 0.72, 0.51 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_verde = texture{ pigment{ color rgb < 0.49, 0.99 , 0 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_escada = texture{ pigment{ color rgb < .5,.6,.8 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_branco = texture{ pigment{ color rgb < 1, 1, 1 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_azul = texture{ pigment{ color rgb < 0, 0, 1 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_amarelo = texture{ pigment{ color rgb <1,1,0 > } finish{ diffuse 0.9 ambient 0.1 } } #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 } // ====================================================================== // DESCRIÇÃO DA CENA background{ color rgb < 0.75, 0.80, 0.85 > } #include "eixos.inc" #declare asa1 = union{ box{ <0.4,0,-0.1>,<-0.4,0.8,0.1> } rotate 30*sin(4*pi*clock)*x } #declare asa2 = union{ box{ <0.4,0,-0.1>,<-0.4,-0.8,0.1> } rotate -30*sin(4*pi*clock)*x } #declare simbolo = union{ difference{ cylinder { <0.2,0,0>, <-0.2,0,0>, 1 } cylinder { <0.31,0,0>, <-0.31,0,0>, 0.8 } } intersection{ cylinder { <0.201,0,0>, <-0.201,0,0>, 0.8 } text {ttf "arial.ttf" "T" 0.4,0.0 rotate z*90 rotate 90*y scale 2.2 translate <-0.3,-0.6,-1> } } object { asa1 translate <0,1,0>} object { asa2 translate <0,-1,0>} texture { tx_branco } } // Aqui está a cena, finalmente: union { object {simbolo rotate 180*sin(pi*clock)*z } translate } #end // gera o quadro correspondente ao instante dado {clock}: quadro(clock)