// Last edited on DATE TIME by USER // Processed by remove-cam-lights #include "colors.inc" #include "metals.inc" #include "stones.inc" #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.8 specular 0.2 roughness 0.005 ambient 0.1 } } #declare cor_vagao = texture { pigment { color rgb < 1.30, 0.90, 0.40 > } finish { diffuse 0.8 specular 0.2 roughness 0.005 ambient 0.1 } } #declare cor_roda = texture { pigment { color rgb < 0, 0, 0 > } finish { diffuse 0.8 specular 0.2 roughness 0.005 ambient 0.1 } } #declare plano = plane { z,0 texture { 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 } } union { box { <-3,-1.5,0.5> <5,1.5,1.5> texture { tx_espelho } } box { <-1,-3,0.5> <-3,3,1.5> texture { tx_espelho } } box { <1,-3,0.5> <3,3,1.5> texture { tx_espelho } } } } 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> } union { #declare i=-2; #while (i<2) object { roda translate <1.75*i,0,-2> } #declare i = i + 1; #end translate <1,0,0> } sphere { <-4.25,0,-1>,0.5 pigment { Blue } } } #declare locomotiva = union { box { <-4,-2,-2> <4,2,1> texture { tx_espelho } } difference { object { vagao } union { box { <-5,-3,-3> <0,3,3> texture { tx_espelho } } box { <-5,-3,-3> <5,3,0> texture { tx_espelho } } } translate <0,0,1> } 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 } } #include "camlight.inc" camlight(<0,0,0>,<40.00,-35.00,20.00>,1.00,z,1.0)