// Last edited on 2005-01-05 22:53:52 by stolfi // Processed by remove-cam-lights background{ color rgb < 0.75, 0.80, 0.85 > } #declare tt = clock; #declare D = 360; #declare A1 = 1100; #declare B = -44; #declare C = 440; #declare A2 = 1300; #if (tt < 0.2) #declare angulo = A1*tt*tt; #else #if (tt < 0.8) #declare angulo = B + C*tt; #else #declare angulo = D - A2*(1-tt)*(1-tt); #end #end #declare tinta_A = texture { pigment { color rgb < 0.70, 0.80, 0.90 > } finish { diffuse 0.5 specular 0.6 roughness 0.05 ambient 0.2 reflection 0.2 } } #declare tinta_B = texture { pigment { color rgb <0, 0.5, 0.9> } finish { diffuse 0.1 specular 1 reflection 0.25 roughness 0.001 ambient 0.3 } } #declare tinta_C = texture { pigment { color rgb <0.6, 0.6, 0.6> } finish { diffuse 0.1 specular 0.3 roughness 0.001 ambient 0.4 } } #declare tinta_D = texture { pigment { color rgb <0.9, 0.4, 0.0> } finish { diffuse 0.1 specular 1 reflection 0.25 roughness 0.001 ambient 0.1 } } #declare tinta_E = texture { pigment { color rgb <0.4, 0.9, 0.0> } finish { diffuse 0.1 specular 1 reflection 0.25 roughness 0.001 ambient 0.1 } } #declare tinta_F = texture { pigment { color rgb < 0.90, 0.10, 0.10 > } finish { diffuse 0.5 specular 0.0 roughness 0.05 ambient 0.2 } } plane { z, -3.6 texture { pigment { checker <.7,.6,0>, <.8,.7,0> } finish { ambient 0.1 diffuse 0.9 } scale 2.0 } } #declare caixa_ext = box { < 4.00,-2.00, -2.50 >, < -4.00, 2.00, 2.50 > texture { tinta_A } } #declare caixa_int = box { < 3.70, -1.70, -2.20 >, < -3.70, 1.70, 2.20 > texture { tinta_A } } #declare janelas_laterais = union { #declare i = 0; #while (i < 3) box { <(2.2*i-3.2), -3, 0> , <(2.2*i-1.3), 3, 2> texture { tinta_A } } #declare i = i+1; #end } #declare corte = box { <1.9, -.3, -.2>, <-1.9, .3, .2> } #declare cortes = union { #declare i = 0; #while (i < 36) #if (mod(i,2) = 0) object { corte texture { tinta_E } translate<15,0,-3.4> rotate 10*i*z } #else object { corte texture { tinta_D } translate<15,0,-3.4> rotate 10*i*z } #end #declare i = i+1; #end } #declare rodas = union { #declare i = 0; #while (i < 4) difference{ cylinder { <2*i-2.7, -2.2, -2.3>, <2*i-2.7, 2.2, -2.3>, 0.7 texture { tinta_B } } box { <(2*i-3.5), -2.0, -3.1> , <(2*i-1.9), 2.0, -1.5> texture { tinta_B } } } #declare i = i+1; #end } #declare engate = union { cylinder { <4, 0, -1.5>, <6, 0, -1.5>, .5 texture {tinta_C} } } #declare vagao = union { difference { object { caixa_ext } object { caixa_int } object { janelas_laterais } } object { rodas } } #declare vagoes = union { #declare i = 0; #while (i < 5) #if ((i = 0)) object { vagao translate<0, 15, 0> rotate 35*i*z } #else union { object { vagao translate<0, 15, 0> rotate 35*i*z } object { engate translate<0, 15, 0> rotate 35*i*z } } #end #declare i = i+1; #end } #declare trilhos = union { lathe { linear_spline 8, <16.6,-3>, <16.8,-3>, <17,-3.2>, <17.2,-3.2>, <17.4,-3>, <17.6,-3>, <17.6,-3.5>, <16.6,-3.5> texture { tinta_C } rotate 90*x } lathe { linear_spline 8, <12.4,-3>, <12.6,-3>, <12.8,-3.2>, <13,-3.2>, <13.2,-3>, <13.4,-3>, <13.4,-3.5>, <12.4,-3.5> texture { tinta_C } rotate 90*x } } #declare cx_ext = box { <5, -4.5, -4>, <-5, 4.5, 4> texture {tinta_F} } #declare cx_int = box { <4.5, -4, -4>, <-4.5, 4, 3.5> texture {tinta_F} } #declare pt = box { <-4, -4.5, -4>, <-1, -4.7, 2> texture {tinta_B} } #declare teto = box { <5.3, -4.8, 3.7>, <-5.3, 4.8, 4.5> texture {pigment {color rgb <1, 1.0, 0>}} } #declare estacao = union{ difference { object { cx_ext } object { cx_int } } object { pt } object { teto rotate 6*x} translate 27*y rotate 150*z } union { object { estacao } object {cortes} object { vagoes rotate angulo*z} object { trilhos } } #include "camlight.inc" camlight(<0.00,-4.00,-4.00>,<50.00,14.00,24.00>,1.00,z,1.0)