// Last edited on 2007-04-01 15:34:23 by stolfi
// Obs: entregou por e-mail por falta de conta ou problema de login.

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

#declare raio = 2.000;

#declare tinta_A = 
  texture {
    pigment { color rgb < 0.10, 0.80, 1.00 > }
    finish { diffuse 0.8 specular 0.3 roughness 0.005 ambient 0.2 }
  }

#declare tinta_B = 
  texture {
    pigment { color rgb < 1.00, 0.80, 0.10 > }
    finish { diffuse 0.8 specular 0.3 roughness 0.005 ambient 0.2 }
  }

#declare tinta_C = 
  texture {
    pigment { color rgb < 1.00, 0.30, 0.30 > }
    finish { diffuse 0.8 specular 0.3 roughness 0.005 ambient 0.2 }
  } 

#declare bola =
  sphere {
    < 0.00, 0.00, 0.00 >, 0.8 
    texture { tinta_C }
  }

#declare base =
box { <0, 0, 0>, <4, 4, 0.5> texture { tinta_C } }

#declare cilindro =
cone {
	<0, 0, 0> , 0.5
	<0, 0, 10>, 0.5
	 texture { tinta_B } 
}

#declare haste =
union { 
    object { bola scale 1.5 translate 5*z }
    object { base translate <-2, -2, -5> }
    object { cilindro translate -5*z }
}

#declare cilindro_topo =
cone {
	<0, 0, 0>, 0.3
	<0, 8, 0>, 0.3
	texture { tinta_B } 
}

#declare braco =
union {
	object { bola }
	object { cilindro_topo }
}

#declare argola = 
torus {
	2.2, 0.4
	texture { tinta_A }
	rotate 90*x
}

#declare tampa = 
box {
	<-1.8, -1.8, 0>, <1.8, 1.8, 0.1> texture { tinta_A }
}

#declare pino =
cylinder { <0,0,0>, <0,0,5>, 0.3 texture { tinta_B } }

#declare pa_cabo = 
cylinder { <0,0,0>, <0,0,-3.5>, 0.15  }

#declare pa_cabeca =
cone { <0,0,-3.5>, 0.5
	<0,0,-4.2>, 0
}

#declare pa = 
union {
	object { pa_cabo }
	object { pa_cabeca }
	texture { tinta_A }
}

#declare rodador = 
union {
	object { pino }
	difference {  object { tampa } object { argola }  }
	object { pa translate 1.65*x }
}


// Aqui está a cena, finalmente:
#declare mexedor =
union {
	object { haste }
	object { braco translate <0, -8, 5> } 
	object { rodador translate -8*y }
}

object { mexedor translate 3*y }

#include "camlight.inc"
camlight(<0,-1.5,0>,<10.00,-10.00,4.00>,1.0,z,1.0)