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


#declare tx_plastico = 
  texture{
    pigment{ color rgb < 0.90, 0.12, 1.00 > }
    finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 }
  }

#declare tx_bug = 
  texture{
    pigment{ color rgb < 1.00, 1.00, 0.00 > }
    finish{ diffuse 0.7 ambient 0.3 }
  }

#declare tx_xadrez =
  texture{
    pigment{ checker color rgb < 0.9, 0.7, 0.80 >, color rgb < 1.00, 0.87, 0.70 > }
    finish{ diffuse 0.9 ambient 0.1 }
    scale 1.5
  }

#include "eixos.inc"

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

  #declare  Cone_perna= cone {
    <0, 0, 0>, 0.25 // <x, y, z>, center & radius of one end
    <0, 0, 2>, 1.0 // <x, y, z>, center & radius of the other end
    
  }
  

  #declare perna1 = cylinder {
    <0, 0,0 >, <0, 2, 0>, .1// center of one end, center of other end, radius
    open // remove end caps
    
  }

  #declare perna2 = cylinder {
    <0, 0,0 >, <0, -2, 0>, 0.1 // center of one end, center of other end, radius
    open // remove end caps
    
  } 

  #declare perna3 = cylinder {
    <0, 0,0 >, <2, 0, 0>, 0.1 // center of one end, center of other end, radius
    open // remove end caps
    
  }

  #declare perna4 = cylinder {
    <0, 0,0 >, <-2, 0, 0>, 0.1 // center of one end, center of other end, radius
    open // remove end caps
    
  }

  #declare roda1= sphere {
    <0, 1.8, -0.5>, 0.4 // <x, y, z>, radius
    
  }
  
 #declare roda2= sphere {
    <0, -1.8, -0.5>, 0.4 // <x, y, z>, radius
    
  }  
  
#declare roda3= sphere {
    <1.8, 0, -0.5>, 0.4 // <x, y, z>, radius
    
  }

#declare roda4= sphere {
    <-1.8, 0, -0.5>, 0.4 // <x, y, z>, radius
    
  }

#declare acento = box {
    <-1, -1, 2>, <2, 2,2.1 > // <x, y, z> near lower left corner, <x, y, z> far upper right corner
    
}

#declare encosto = box {
    <-1, -1, 2>, <2, -1.2,7 > // <x, y, z> near lower left corner, <x, y, z> far upper right corner
    
}

#declare buraco1 = box {
  <-0.8, -0.5, 2.5>, <1.9, -1.7, 3> // Professor.
  
}
#declare buraco2 = box {
  <-0.8, -1, 3.5>, <1.9, -1.2, 4> // <x, y, z> near lower left corner, <x, y, z> far upper right corner
  
}

#declare buraco3 = box {
  <-0.8, -1, 4.5>, <1.9, -1.2, 5> // <x, y, z> near lower left corner, <x, y, z> far upper right corner
  
}

#declare buraco4 = box {
  <-0.8, -1, 5.5>, <1.9, -1.2, 6> // <x, y, z> near lower left corner, <x, y, z> far upper right corner
  
}

#declare ret1 = box {
  <-0.8, -1.1, 2.6>, <1.7, -1.15, 2.8> // <x, y, z> near lower left corner, <x, y, z> far upper right corner
  
}



union{
  // object{ eixos(3.00) }

  object{ chao  translate < 0,0,-5 > texture{ tx_xadrez } }
  object{perna1 texture {tx_plastico}}
  object{perna2 texture {tx_plastico}}
  object{perna3 texture {tx_plastico}}
  object{perna4 texture {tx_plastico}}
  object{roda1 texture { tx_plastico}}
  object{roda2 texture { tx_plastico}}
  object{roda3 texture { tx_plastico}}
  object{roda4 texture { tx_plastico}}
  object{Cone_perna texture {tx_plastico}}
  object{acento texture {tx_plastico}}
  difference{
    object{encosto texture {tx_plastico}}
    union{
      object{buraco1 }
      object{buraco2 }
      object{buraco3 }
      object{buraco4 }
      texture{tx_bug} // Professor.
    }
  }

  intersection {
    difference{
  object{encosto texture {tx_plastico}}
  object{buraco1 }
  object{buraco2 }
  object{buraco3 }
  object{buraco4 }
  
  }
  object{ret1}
    
  }

}

#include "camlight.inc"
#declare centro_cena = < 0.00, 0.00, 3.10 >;
#declare raio_cena = 6.8;
#declare dir_camera = < 14.00, 7.00, 4.00 >;
#declare dist_camera = 5*raio_cena;
#declare intens_luz = 1.20;
camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)