// Exemplo de arquivo de descricao de cena para POV-ray // Last edited on 2003-09-04 15:25:26 by stolfi // ====================================================================== // CÂMERA camera { location < -3.500, -3.500, 1.500 > // Posição do observador. right -1*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. } // ====================================================================== // DESCRIÇÃO DA CENA background{ color rgb < 0.75, 0.80, 0.85 > } #declare raio = 2.000; #declare tinta_A = texture { pigment { color rgb < 0.10, 0.80, 1.00 > } 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.5 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tempo = clock; #declare h = 0.2; #declare cir = 360; #declare acel = cir/(2*h*(1-h)); #declare vel = 2*acel*h; #declare pos2 = -acel*h*h; #declare vagao = box { < -0.1, -0.2, 0 >, < 0.1, 0.2, 0.4 > texture { tinta_A } } #declare trilho1 = cylinder { <0,0,-0.1>, <0,0,0>, 2 open texture {tinta_B} } #declare trilho2 = cylinder { <0,0,-0.1>, <0,0,0>, 2.2 open texture {tinta_B} } #declare r1 = cylinder { <-0.1,-0.2,0>, <-0.12,-0.2,0>, 0.06 } #declare r2 = box { <-0.12,-0.21,-0.05>, <-0.13,-0.19,0.05> texture {tinta_B} } #declare roda = union { object {r1} object {r2} } #declare trilho = union { object {trilho1} object {trilho2} } #declare trem = union { object {vagao} object {roda} object {roda translate <0,0.4,0>} object {roda translate <0.2,0.4,0>} object {roda translate <0.2,0,0>} translate <2.1,0,0> } // Aqui está a cena, finalmente: #if (tempo < 0.20) object {trem rotate (acel*(tempo*tempo))*z} #else #if (tempo < 0.80) object {trem rotate (pos2+vel*(tempo))*z} #else object {trem rotate (cir-acel*(1-tempo)*(1-tempo))*z} #end #end object {trilho}