// Last edited on DATE TIME by USER
// Processed by remove-cam-lights

background{ color rgb < 0.75, 0.80, 0.85 > }

#declare tx_chao =
  texture{
    pigment{ color rgb < 0.00, 0.80, 0.10 > }
    finish{ diffuse 0.9 ambient 0.1 }
  }

#declare tx_chassis =
  texture{
    pigment{ color rgb < 0.10, 0.20, 0.90 > }
    finish{ diffuse 0.9 ambient 0.1 }
  }

#declare tx_luz =
  texture{
    pigment{ color rgb < 1, 1, 1 > }
    finish{ diffuse 0.1 ambient 0.9 }
  }

#declare tx_roda =
  texture{
    pigment{ color rgb < 0.1, 0.1, 0.1 > }
    finish{ diffuse 0.1 ambient 0.9 }
  }

#declare tx_eixo =
  texture{
    pigment{ color rgb < 0.1, 0.1, 0.1 > }
    finish{ diffuse 0.1 ambient 0.9 }
  }

#declare un = 0.500;

#declare chao =
  box{ <-20,-20,-1>, <+20,+20,0> }

#declare cupula =
  intersection{
    sphere{ < 0,0,0 >, 2 * un }

    box { <-3 * un, -3 * un,  3>,
    <3 * un, 3 * un,  0 * un> }
  }

#declare lanterna = cylinder { <0 , -0.2 * un ,  0>,
                               <0 ,  0.2 * un ,  0> , 0.5 * un}

#declare eixo = cylinder { <-3 * un , 0 ,  0> ,
                           <+3 * un , 0 ,  0> , 0.4 * un }

#declare roda = cylinder { <-0.5 * un , 0 ,  0> ,
                           <+0.5 * un , 0 ,  0> , un }

#declare chassis =
difference{
                   box { <-3 * un, -4 * un,  0>,
                         <3 * un, 4 * un,  2 * un> }

    union{
      object{ eixo  scale 1.1 translate < 0        , -2.5 * un, 0*un > }
      object{ roda  scale 1.1 translate < -2.5 * un, -2.5 * un, 0*un > }
      object{ roda  scale 1.1 translate < +2.5 * un, -2.5 * un, 0*un > }

      object{ eixo  scale 1.1 translate < 0        , +2.5 * un, 0*un > }
      object{ roda  scale 1.1 translate < -2.5 * un, +2.5 * un, 0*un > }
      object{ roda  scale 1.1 translate < +2.5 * un, +2.5 * un, 0*un > }
    }
}

union{
  object{ chao texture{tx_chao}  translate < 0,0,0 >}

  object{ chassis texture{tx_chassis} translate < 0, 0, un > }
  object{ cupula texture{tx_chassis}
          translate < 0, 0, 3 * un >
          scale <1.25, 1.75, 1> }

  object{ lanterna texture{tx_luz} translate < -1*un, 4*un, 2 * un> }
  object{ lanterna texture{tx_luz} translate < +1*un, 4*un, 2 * un> }

  object{ eixo texture{tx_eixo}  translate < 0        , -2.5 * un, 1*un > }
  object{ roda texture{tx_roda}  translate < -2.5 * un, -2.5 * un, 1*un > }
  object{ roda texture{tx_roda}  translate < +2.5 * un, -2.5 * un, 1*un > }

  object{ eixo texture{tx_eixo}  translate < 0        , +2.5 * un, 1*un > }
  object{ roda texture{tx_roda}  translate < -2.5 * un, +2.5 * un, 1*un > }
  object{ roda texture{tx_roda}  translate < +2.5 * un, +2.5 * un, 1*un > }

}

#include "camlight.inc"
#declare centro_cena = < 0.00, 0.00, 1.00 >;
#declare raio_cena = 10.0;
#declare dir_camera = < 15.00, 15.0, 1 >;
#declare dist_camera = 16.0;
#declare intens_luz = 1.00;
camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)