// 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 < 20.00, 13.00, 8.00 > // Posição do observador. // location < 8.00, 7.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. look_at < 0.00, -8.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. } //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 cor_Amarela = <1, 0.8, 0.1>; #declare tinta_Azul = texture { pigment { color rgb < 0.00, 0.00, 1.00 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_Preta = texture { pigment { color rgb < 0.00, 0.00, 0.00 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_Verde = texture { pigment { color rgb < 0.00, 1.00, 1.00 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_Vermelha = texture { pigment { color rgb < 1.00, 0.00, 0.00 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta1 = texture { pigment { color rgb < 0.30, 0.50, 0.20 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_X = texture { pigment { color rgb < 0.75, 0.8, 0.85 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare maquina = union{ box { <-0.5,-1.00,0>, <3.5,1.00,0.1> rotate 100*z texture { tinta1 } } box { <-0.5,-1.00,0.1>, <1.25,1.00,2> rotate 100*z texture { tinta1 } } difference{ cylinder { < 1.25, 0, 0.1 >, < 3.5, 0, 0.1>, 1 rotate 100*z texture { tinta_Azul } } box { <-0.6,-1.10,-1.5>, <3.6,1.10,0> rotate 100*z texture { tinta_Azul } } } cylinder { < 2.8, 0, 0.1 >, < 2.8, 0, 2.5>, 0.3 rotate 100*z texture { tinta_Azul } } } #declare vagao = box { <-5.5,-1.00,0>, <-1.5,1.00,2> texture { tinta_Verde } } #declare roda = cylinder { < 0, -1, 0 >, < 0, -1.1,0>, 0.5 texture { tinta_X } } #declare janela_redonda = cylinder { < 1, -1.05, 1.5 >, < 1, 1.05, 1.5 >, 0.2 texture { tinta_Vermelha } } #declare janela_quadrada = box { <0.8,-1.05,1.70>, <1.2,1.05,1.30> texture { tinta_Azul } } #declare dormente = box { <0,-1.1,-0.5>, <0.3,1.1,-0.7> texture { tinta_Preta } } #declare trilho = union{ box { <-100,-1,-0.5>, <100,-1.1,-0.7> rotate 100*z texture { tinta_Preta } } box { <-100,1,-0.5>, <100,1.1,-0.7> rotate 100*z texture { tinta_Preta } } #declare h=-100; #while (h<100) object{dormente translate rotate 100*z} #declare h=h+1; #end } plane { z,-0.7 texture{ //pigment { checker <0,0,0>, <1,1,1> } pigment { color rgb < 0.60, 0.30, 0.10 > } finish { ambient 0.1 diffuse 0.9 } scale 5 } } #declare gerador = seed(99999); #declare trem = union{ object{maquina} object{trilho} #declare i=0; #while (i<3) object{janela_quadrada translate<-0.5*i,0,0> rotate 100*z} #declare i=i+1; #end #declare j=0; #while (j<4) object{roda translate rotate 100*z} object{roda translate rotate 100*z} #declare j=j+1; #end #declare k=0; #while(k<6) object{vagao translate<-5*k,0,0> rotate 100*z} #declare q=0; #while (q<4) object{roda translate<(-5*(k+1))+q,0,0> rotate 100*z} object{roda translate<(-5*(k+1))+q,2.1,0> rotate 100*z} #declare q=q+1; #end #declare w=0; #while (w<3) #if (rand(gerador)>=0.5) object{ janela_redonda translate<(-5*(k+1))+w-0.5,0,0> rotate 100*z} #else object{ janela_quadrada translate<(-5*(k+1))+w-0.5,0,0> rotate 100*z} #end #declare w=w+1; #end #declare k=k+1; #end } union{ object{ trem } }