// Exemplo de arquivo de descricao de cena para POV-ray #include "colors.inc" #include "metals.inc" #include "stones.inc" // ====================================================================== // CÂMERA camera { location <40.00, -35.00, 20.00 > // Posição do observador. right -1.00*x // Largura RELATIVA da imagem. up 0.50*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 * < 2.50, 2.50, 1.00 > // Intensidade e corda luz. } light_source { 5 * < +50.0, -10.0, +10.0 > // Posição da lâmpada. color rgb 0.8 * < 2.50, 2.00, 1.00 > // Intensidade e corda luz. } // ====================================================================== // DESCRIÇÃO DA CENA #declare gerador = seed(123456); background{ color rgb < 0.75, 0.80, 0.85 > } #declare cor_espelho = < 0.4, 0.4, 0.4 >; #declare tx_espelho = texture { pigment { rgb cor_espelho } finish { ambient 0.05 diffuse 0.05 reflection cor_espelho specular 0.20 roughness 0.05 } } #declare cor_vidro_azul = < 0.2, 0.2, 1.7>; #declare tx_vidro_azul = texture { finish { ambient 0.1 diffuse 0.1 reflection 0.25 specular 1 roughness 0.001 } pigment { color cor_vidro_azul filter 1 } } #declare cor_motor = texture { pigment { color rgb < 0.3, 0.3, 0.3 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare cor_vagao = texture { pigment { color rgb < 1.30, 0.90, 0.40 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare cor_roda = texture { pigment { color rgb < 0, 0, 0 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare plano = plane { z,0 texture { // pigment { checker <0.3,0.2,0.2>, <0.4,0.4,0.6> } // finish { ambient 0.2 diffuse 0.9 } // scale 1.7 T_Stone13 } } #declare janela_lateral = box { <-1,-0.05,-0.5> <1,0.05,0.5> texture { tx_vidro_azul } interior { ior 1.2 } } #declare janela_frente = box { <-0.05,-1.5,-0.5> <0.05,1.5,0.5> texture { tx_vidro_azul } interior { ior 1.2 } } #declare roda = cylinder { <0,-2.05,0> <0,2.05,0> 0.5 texture { cor_roda } } #declare vagao = union { difference { box { <-4,-2,-2> <4,2,2> texture { tx_espelho } //cor_vagao } } union { //janela frente box { <-3,-1.5,0.5> <5,1.5,1.5> texture { tx_espelho } //cor_vagao } } //janela lateral box { <-1,-3,0.5> <-3,3,1.5> texture { tx_espelho } //cor_vagao } } //janela lateral box { <1,-3,0.5> <3,3,1.5> texture { tx_espelho } //cor_vagao } } } } //janelas de vidro object { janela_lateral translate <2,-2,1> } object { janela_lateral translate <-2,-2,1> } object { janela_lateral translate <2,2,1> } object { janela_lateral translate <-2,2,1> } object { janela_frente translate <4,0,1> } // rodas union { #declare i=-2; #while (i<2) object { roda translate <1.75*i,0,-2> } #declare i = i + 1; #end translate <1,0,0> } // conexao sphere { <-4.25,0,-1>,0.5 pigment { Blue } } } #declare locomotiva = union { box { <-4,-2,-2> <4,2,1> texture { tx_espelho } //cor_vagao } } difference { object { vagao } union { box { <-5,-3,-3> <0,3,3> texture { tx_espelho } //cor_vagao } } box { <-5,-3,-3> <5,3,0> texture { tx_espelho } //cor_vagao } } } translate <0,0,1> } // rodas union { #declare i=-2; #while (i<2) object { roda translate <1.75*i,0,-2> } #declare i = i + 1; #end translate <1,0,0> } cone { <4,0,0>,1.5 <7,0,0>,0 texture { cor_motor } } } #declare trem = union { #declare i = 0; #while (i<8) #if (i=0) object { locomotiva translate <0,20,2.5> rotate (i*28)*z } #else object { vagao translate <0,20,2.5> rotate (i*28)*z } #end #declare i = i + 1; #end } #declare trilho = union { lathe { linear_spline 5 <19,0>,<19.25,0>,<19.25,0.25>,<19,0.25>,<19,0> texture { tx_espelho } rotate 90*x } lathe { linear_spline 5 <21,0>,<21.25,0>,<21.25,0.25>,<21,0.25>,<21,0> texture { tx_espelho } rotate 90*x } #declare i=0; #while (i<36) box { <-0.25,-2.25,-0.25> <0.25,2.25,0.25> #if (rand(gerador)>0.5) pigment { Blue } #else pigment { Red } #end translate <0,20,0> rotate (10*i)*z } #declare i = i + 1; #end } #declare estacao = union { difference { box { <-20,-2,0> <20,2,6> texture {T_Brass_1A} } box { <-21,-3,1> <21,1,7> texture {T_Brass_1A} } } box { <-21,-6,6> <21,2.5,6.25> texture {T_Stone24} } translate <-8,25,0> } #declare tt = clock; #if (tt<0.20) #declare posicao = 750*tt*tt; #else #if (tt<0.80) #declare posicao = (-70+500*tt); #else #declare posicao = 360-750*(1-tt)*(1-tt); #end #end union { object { plano } object { trem rotate (-posicao)*z } object { trilho } object { estacao } }