// Last edited on DATE TIME by USER // Processed by remove-cam-lights # include "textures.inc" 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.8 specular 0.2 roughness 0.005 ambient 0.1 } } #declare tinta_B = texture { pigment { color rgb < 1, 1, 1 > } 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 cor_vidro = < 0,0,0.5>; # declare tx_vidro = texture { pigment {rgb cor_vidro} finish { ambient 0.05 diffuse 0.55 reflection cor_vidro specular 0.20 roughness 0.05 } } # declare gerador = seed(123456); # declare vagao = union{ # declare r=0; # while (r<4) union{ box {<2.5,0,0.5>,<0,0.5,2> texture { tinta_B }} box {<0,0.2,0.5>,<-0.5,0.3,0.7> texture {cor_roda }} cylinder {<0.30,-0.02,0.25 >, <0.30,0.52,0.25 >, 0.25 texture {cor_roda} translate <0.6*r,0,0> }} # declare r=r+1; #end } # declare locomotiva = union{ difference{ box {<2.5,-0.2,0.5>,<0,0.7,2.5> texture { tinta_B }} box {<-0.1,-0.3,1.5>,<1,0.8,2.6> texture { tinta_B }} } box {<1.2,-0.21,1.5>,<2,0.71,2.2> texture {tx_vidro } } cylinder {<0.30,-0.22,0.25 >, <0.30,0.82,0.25 >, 0.25 texture {cor_roda} } cylinder {<0.30,-0.22,0.25 >, <0.30,0.82,0.25 >, 0.25 texture {cor_roda} translate <1.5,0,0> } translate <-1.25,-0.25+9.5,0> } # declare trem = union { object {locomotiva rotate 17*z } # declare j=0; # while (j<3) # declare i=0; #while (i<5) union{ union { object { vagao } # if (rand(gerador) > 0.5) box {<0.1,-0.02,1.1>,<0.4,0.52,1.4> texture {tx_vidro } translate <0.5*i,0,0>} # else cylinder {<0.25,-0.02,1.25 >, <0.25,0.52,1.25 >, 0.2 texture {tx_vidro} translate <0.5*i,0,0>} #end } translate <-1.25,-0.25+9.5,0> rotate -18*z*j } # declare i=i+1; #end # declare j=j+1; #end } #declare trilho = difference { lathe { linear_spline 2,< 9, 0 >, < 10, 0.3 > texture { tx_vidro } rotate 90*x } lathe { linear_spline 2,< 9.1, 0 >, < 9.99, 0.3 > texture { tx_vidro } rotate 90*x } } plane{z,-0.1 texture{ Jade} } #declare eixo = union { cylinder { <0,0,0 >, <1000,0,0 >, 0.05 texture { tinta_B } } cylinder { <0,0,0 >, <0,1000,0>, 0.05 texture { tinta_B } } cylinder { <0,0,0 >, <0,0,1000 >, 0.05 texture { tinta_B } } } # declare estacao = union{ box {<0,0,0>,<3,3,3> texture { tinta_A }}} #declare tempo=clock; #declare h=0.2; #declare D=360; #declare A=D/(2*h*(1-h)); #declare B=-A*h*h; #declare C=2*A*h; #if (tempo<0.2) #declare pos = A*clock*clock; #else #if (tempo<0.8) #declare pos = B+C*clock; #else #declare pos = (D-A*(1-clock)*(1-clock)); #end #end union { object {trilho} object {estacao translate <0,12,0>} union { object { trem } rotate z*pos } } #include "camlight.inc" camlight(<0,0,0>,<30.00,0.00,10.00>,1.00,z,1.0)