// Last edited on 2005-01-05 22:58:27 by stolfi // Processed by remove-cam-lights #include "colors.inc" #declare semente = seed(4345); background{ color rgb < 0.75, 0.80, 0.85 > } #declare tx_cristal = texture { finish { ambient 0.1 diffuse 0.1 reflection 0.25 specular 1 roughness 0.001 } pigment { color rgb <0.5, 0.5, 1.0> filter 1 } } #declare tx_cristal2 = texture { finish { ambient 0.1 diffuse 0.1 reflection 0.25 specular 1 roughness 0.001 } pigment { color Brown filter 1 } } #declare cor_espelho = <1.0, 1.0, 0.3> ; #declare tx_espelho = texture { pigment { color rgb <1.00, 1.00, 1.00> } finish { ambient 0.05 diffuse 0.05 reflection cor_espelho specular 0.20 roughness 0.05 metallic } } #declare pintura = texture { pigment { color Gray60 } finish { diffuse 0.8 specular 0.2 roughness 0.005 ambient 0.1 } } #declare roda = object { union { object { torus { 0.45, 0.3 texture { pigment { Gray90 } } } } object { sphere { <0,0.4,0>, 0.1 texture { pigment { Gray30 } } } } } rotate <0,clock*50,0> } #declare janela = box { <0.20, 2.10, 2.0>, <1.00, 1.80, 2.8> texture { tx_espelho } } #declare chamine = union { object { cylinder { <0, 0, 0>, <0, 0, 1.2>, 0.7 texture { pigment { Red } } } } object { torus { 0.8, 0.2 texture { pigment { Red } } } rotate <90,0,0> translate <0, 0, 1> } } #declare frente = box { <-0.3, -1.5, 1.5>, <0, 1.5, 2.8> texture { pigment { Black } } } #declare vagao = difference { union { object { box { <0.00, 2.00, 0.30>, <5.00, -2.00, 3.00> texture { pigment { Green } } } } object { polygon { 4, <0, 2.0, 1.4>, <0, 2.0, 1.6>, <5.0, 2.0, 1.4>, <5.0, 2.0, 1.6> texture { pigment { Red } } } } object { polygon { 4, <0, -2.0, 1.4>, <0, -2.0, 1.6>, <5.0, -2.0, 1.4>, <5.0, -2.0, 1.6> texture { pigment { Red } } } } #declare rodas = 0.5; #while (rodas <= 6) object { roda translate } object { roda translate } #declare rodas = rodas + 1.4; #end } #declare janelas = 0.0; #while (janelas <= 5) object { janela translate } object { janela translate } #declare janelas = janelas + 1.0; #end } #declare trem = union { #declare vagoes = 1; #declare nvagoes = 5 + 5*rand(semente); #while(vagoes <= nvagoes) #if (vagoes <= nvagoes) difference { union { object { vagao translate <-vagoes*6.0, 0, 0> } object { chamine translate <-nvagoes*5.4, 0, 3> } } object { frente translate <-nvagoes*5.4, 0, 0> } } #else object { vagao translate <-nvagoes*5.4, 0, 0> } #end #declare vagoes = vagoes + 1; #end } #declare lama = plane { z, 0 pigment { wrinkles } } #declare estacao = union { object { cylinder { <-40, 6, 0>, <-40,6, 5>, 2 texture { tx_cristal } } } object { cone { <-40, 6, 5>, 2, <-40,6,8>, 0 texture { tx_cristal } } } } #declare estrada = box { <500,3.5,0>, <-500,-3.5,0.1> pigment { Red } } #declare passo1 = -400.0; #declare passo2 = -100.0; #if (clock > 0.5) #declare clock2 = 1-clock; #else #declare clock2 = clock; #end #if (clock2 < 0.2) #declare pos = passo1*clock2*clock2; #else #if (clock < 0.8) #declare pos = passo2*clock2; #else #declare pos = passo1*(1-clock2)*(1-clock2); #end #end #if (clock > 0.5) #declare pos1 = -pos; #else #declare pos1 = pos; #end difference { union { object { estrada } object { trem translate <2+pos1,0,0> } object { estacao } } } #include "camlight.inc" camlight(<-20,-10,0>,<-25,35,4>,1.00,z,1.0)