// Last edited on 2005-01-05 22:55:55 by stolfi // Processed by remove-cam-lights background{ color rgb < 0.75, 0.80, 0.85 > } #declare raio = 2.000; #declare tinta_Cinza = texture { pigment { color < 0.5, 0.5, 0.5 > } finish { diffuse 0.8 specular 0.2 roughness 0.005 ambient 0.1 } } #declare tinta_Cinza_Claro = texture { pigment { color < 0.9, 0.9, 0.9 > } finish { diffuse 0.8 specular 0.2 roughness 0.005 ambient 0.1 } } #declare tinta_Vermelha = texture { pigment { color < 0.9, 0.1, 0.1 > } finish { diffuse 0.8 specular 0.2 roughness 0.005 ambient 0.1 } } #declare tinta_Marrom = texture { pigment { color < 0.5, 0.1, 0.1 > } finish { diffuse 0.8 specular 0.2 roughness 0.005 ambient 0.1 } } #declare cor_cromo = < 0.7, 0.7, 0.73 >; #declare tinta_cromada = texture { finish { ambient 0.05 diffuse 0.05 reflection cor_cromo specular 0.2 roughness 0.05 } pigment { color cor_cromo } } #declare chao = plane {z,0 texture { pigment { checker <0,0.4,0>, <0,0.45,0>} finish {ambient 0.1 diffuse 0.9} scale 3 } } #declare Locom_caldeira = cylinder { < 0, 0, 0 >, < 4, 0, 0 >, 0.7 texture {tinta_Cinza} } #declare Locom_chamine = cylinder { < 0, 0, 0 >, < 0, 0, 0.5 >, 0.3 texture {tinta_Cinza} } #declare Locom_Box = box { < 0, 0, 0 >, < -2.5, 1.5, 2> texture {tinta_Cinza} } #declare Roda = cylinder { < 0, 0, 0 >, < 0, 0.1, 0 >, 0.5 texture {tinta_Cinza_Claro} } #declare Vagao_Box = box { < 0, 0, 0 >, < 4.5, 1.5, 1.9> translate <0,-0.75,-0.7> } #declare Janela_Vagao = box { < 0, 0, 0>, < 0.5, 3, 0.5> texture { pigment { color < 1, 1, 1 > } finish { diffuse 0.8 specular 0.2 roughness 0.005 ambient 0.1 } } } #declare Vagao = union { difference { object {Vagao_Box} #declare i = 0; #while (i < 5) object{Janela_Vagao translate<+0.5+(0.8*i), 0, 0.5> } #declare i=i+1; #end } #declare j = 0; #while (j < 2) #declare i = 0; #while (i < 4) #if (j=0) #declare k=-1; #else #declare k=1; #end object{Roda translate<3.7-(1.1*i), 0.8*k, -0.4> } #declare i=i+1; #end #declare j = j+1; #end } #declare Locomotiva = union { difference { object{Locom_Box translate <0,-0.75,-0.7>} object{Janela_Vagao scale<3,1,1.2> translate <-2,-0.75,0.3>} object{Janela_Vagao scale<5,0.37,0.8> translate <-1,-0.5,0.75>} } object{Locom_chamine translate<3.2,0,0.6>} object{Locom_caldeira} #declare j = 0; #while (j < 2) #declare i = 0; #while (i < 5) #if (j=0) #declare k=-1; #else #declare k=1; #end #if (i<3) #declare a=0; #else #declare a=0.8; #end object{Roda translate<3.5-(1.1*i)-a, 0.8*k, -0.4> } #declare i=i+1; #end #declare j = j+1; #end } #declare trilho_metal = box { <0,0,0> <-500,0.1,0.2> texture{tinta_Cinza_Claro} } #declare trilho_madeira = box { <0,0,0> <0.3,2,0.2> texture{tinta_Marrom} } #declare raio_trilho = 20; #declare trilho2 = lathe { linear_spline 5, <19.9,0>, <20.0,0>, <20,0.1>, <19.9,0.1>, <19.9,0> texture { tinta_Cinza_Claro } rotate 90 * x } #declare trilho3 = lathe { linear_spline 5, <21.5,0>, <21.6,0>, <21.6,0.1>, <21.5,0.1>, <21.5,0> texture { tinta_Cinza_Claro } rotate 90 * x } #declare c=clock; #declare g = seed(1329756); union { object {Locomotiva translate<0,raio_trilho+0.7,0>} #declare i = 0; #while (i < 10) object {Vagao translate <-2.25,raio_trilho+0.7,0> rotate <0,0,(i+1)*15+1> texture { pigment { color < rand(g)*1.5, rand(g)*1.5, rand(g)*1.5 > } finish { diffuse 0.8 specular 0.2 roughness 0.005 ambient 0.1 } } } #declare i=i+1; #end #declare A=750; #declare B=-70; #declare C=500; #declare D=360; #if (c<0.2) rotate<0,0,-1*(c*c*A)> #else #if (c<0.8) rotate<0,0,-1*(C*c +B)> #else rotate<0,0,-1*(D-A*(1-c)*(1-c))> #end #end } #declare i = 0; #while (i < 180) object {trilho_madeira translate <0,raio_trilho-0.2,-1.3> rotate <0,0,i*2> } #declare i=i+1; #end object {chao translate <0,0,-1.31>} object{trilho2 translate<0,0,-1.1>} object{trilho3 translate<0,0,-1.1>} #include "camlight.inc" camlight(<0,0,-5>,<30.00,40,17>,1.00,z,1.0)