// Last edited on DATE TIME by USER // Processed by remove-cam-lights background{ color rgb < 0.75, 0.80, 0.85 > } #declare cor_dourada = < 0.80, 0.80, 0.05 >; #declare tinta_dourada = texture { pigment { rgb cor_dourada } finish { diffuse 0.05 specular 0.20 roughness 0.05 ambient 0.05 reflection cor_dourada } } #declare cor_vagao = texture { pigment { color rgb < 0.40, 0.15, 0.15 > } } #declare cor_locomotiva = texture { pigment { color rgb < 0.10, 0.30, 0.10 > } } #declare cor_roda = texture { pigment { color rgb < 0.75, 0.75, 0.75 > } } #declare cor_pino = texture { pigment { color rgb < 0.15, 0.15, 0.15 > } } #declare cor_trilho = texture { pigment { color rgb < 0.35, 0.35, 0.35 > } } #declare cor_estacao = texture { pigment { color rgb < 0.60, 0.60, 0.10 > } } #declare accel=39.26991; #declare velang=7.853982; #if (clock < 0.2) #declare theta = (clock * clock * accel) / 2.0; #else #if (clock < 0.8) #declare theta = 0.02 * accel + (clock - 0.2) * velang; #else #declare theta = (0.02 - (clock - 0.8)*(clock - 0.8)/2.0)* accel + (clock - 0.2) * velang; #end #end #declare x_vagao = 8.5; #declare r_roda = 0.35; #declare r_caminho = 25.00; #declare roda = union { cylinder { <0.0, -(r_roda + 0.10), 0.20>, <0.0, -(r_roda + 0.10), 0.30>, r_roda texture { cor_roda } } box { <0.15, -(r_roda - 0.05), 0.16>, <-0.15, -(r_roda + 0.25), 0.34> rotate theta*57.29578*y texture { cor_pino } } } #declare eixo = union { object { roda } object { roda translate <0.00, 0.00, 1.50> } } #declare janela_vagao = box { <1.00, 1.00, -0.10>, <2.50, 2.20, 2.10> } #declare vagao_com_janelas = difference { box { <0.00, 0.00, 0.00>, texture { cor_vagao } } #declare i=0; #while (i < 3) object { janela_vagao translate <2.50*i , 0.00, 0.00> } #declare i=i+1; #end } #declare vagao = union { object { vagao_com_janelas } object { eixo translate } object { eixo translate <3*r_roda + 0.40, 0.00, 0.00> } object { eixo translate } object { eixo translate } } #declare locomotiva = object { difference { union { box { <0.00, 0.00, 0.00>, <2.00, 3.00, 2.00> } box { <2.00, 0.00, 0.00>, <4.00, 2.00, 2.00> } box { <4.00, 0.00, 0.00>, <8.00, 0.40, 2.00> } cylinder { <4.00, 1.15, 1.00>, <8.00, 1.15, 1.00>, 0.75 } cylinder { <2.60, 2.00, 1.00>, <2.60, 3.00, 1.00>, 0.30 } cylinder { <3.40, 2.00, 1.00>, <3.40, 3.00, 1.00>, 0.30 } object { eixo translate } object { eixo translate <3*r_roda + 0.40, 0.00, 0.00> } object { eixo translate <8 - 0.40 - 3*r_roda, 0.00, 0.00> } object { eixo translate <8 - 0.30 - r_roda, 0.00, 0.00> } } box { <0.40, 1.20, -0.10>, <1.60, 2.40, 2.10> texture { cor_locomotiva } } } texture { cor_locomotiva } } #declare r_trilho = 0.10; #declare trilhos = object { union { torus { r_caminho - 0.75, r_trilho } torus { r_caminho + 0.75, r_trilho } texture { cor_trilho } } translate <0.00, -(2*r_roda + 0.10 + r_trilho/2), 0.00> } #declare y_chao = -0.10 - 2*r_roda - 2*r_trilho; #declare chao = plane { y, y_chao texture { pigment { checker <0.20, 0.20, 0.05>, <0.10, 0.10, 0.25> } finish {ambient 0.1 diffuse 0.9} scale 3 } } #declare estacao = union { difference { box { <-5.00, y_chao - 0.05, r_caminho>, <5.00, 1.0, r_caminho + 6.00> texture { cor_estacao } } cylinder { <0.0, y_chao - 0.10, 0.0>, <0.0, 1.05, 0.0>, r_caminho + 2 texture { cor_estacao } } } difference { union { box { <-5.00, 0.95, r_caminho + 2.00>, <-4.70, 5.00, r_caminho + 6.00> texture { cor_estacao } } box { <5.00, 0.95, r_caminho + 2.00>, <4.70, 5.00, r_caminho + 6.00> texture { cor_estacao } } } box { <-5.10, 2.00, r_caminho + 3.00>, <5.10, 3.00, r_caminho + 5.00> texture { cor_estacao } } } box { <-5.00, 0.95, r_caminho + 5.7>, <5.00, 5.00, r_caminho + 6.00> texture { cor_estacao } } box { <-5.00, 4.80, r_caminho>, <5.00, 5.00, r_caminho + 6.00> texture { cor_estacao } } } #declare vagoes=7; union { #declare i_vagao=1; #while (i_vagao < vagoes) #if (i_vagao=1) object { locomotiva translate <-4.00, 0.00, r_caminho - 1.00> rotate theta*57.29578*y } #else object { vagao translate <-x_vagao/2.00, 0.00, r_caminho - 1.00> rotate theta*57.29578*y } #end #declare theta = theta - (x_vagao + 1)/r_caminho; #declare i_vagao = i_vagao + 1; #end object { trilhos } object { chao } object { estacao } } #include "camlight.inc" camlight(<0,0,0>,<30.00,15.00,-50.00>,1.00,y,1.0)