// Last edited on 2005-01-05 23:29:28 by stolfi
// Processed by remove-cam-lights

# include "textures.inc"

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.2 roughness 0.005 ambient 0.1 }
  }

#declare tinta_B =
  texture {
    pigment { color rgb < 1, 1, 1 > }
    finish { diffuse 0.8 specular 0.2 roughness 0.005 ambient 0.1 }
  }

#declare cor_roda =
  texture {
    pigment { color rgb < 0,0,0 > }
    finish { diffuse 0.8 specular 0.2 roughness 0.005 ambient 0.1 }
  }

# declare cor_vidro =  < 0,0,0.5>;
# declare tx_vidro =
   texture {
      pigment {rgb cor_vidro}
      finish {
          ambient 0.05 diffuse 0.55
   reflection cor_vidro
          specular 0.20 roughness 0.05
 }
}

# declare gerador = seed(123456);

#declare mao =
 union{ union { box {<-0.5,0.2,0>,<1.5,-0.2,1> texture {tinta_B }}
  cylinder {<1.5,0,0 >, <2.2,0,0>, 0.1 texture {tinta_B}}
  cylinder {<1.5,0,0.3 >, <2.2,0,0.3>, 0.12 texture {tinta_B}}
  cylinder {<1.5,0,0.6 >, <2.2,0,0.6>, 0.13 texture {tinta_B}}
  cylinder {<1.5,0,0.9 >, <2.2,0,0.9>, 0.12 texture {tinta_B}}
  cylinder {<1.2,0,1.0 >, <1.2,0,1.5>, 0.12 texture {tinta_B} }
} translate <0,0,-0.5>}

# declare L = 4.0;
# declare R = 0.5;

#declare a1 = 30*sin(clock*15*pi);
#declare a2 = 10*sin(clock*pi);
#declare a3 = -40*sin(clock*pi);
#declare a4 = -30*sin(clock*pi);

#declare braco1 =
 union { cylinder {<0,0,0 >, <L,0,0>, R texture {tinta_B}}
  object{ mao rotate a1*y rotate -a3*z  translate <L,0,0>  }
}

#declare braco2 =
 union { cylinder {<0,0,0 >, <L,0,0>, R texture {tinta_A}}
  object{ braco1 rotate -a2*y rotate a2*9*x translate <L,0,0> }
}

#declare braco3 =
 union { cylinder {<0,0,0 >, <L,0,0>, R texture {tinta_B}}
  object{ braco2 rotate a3*z translate <L,0,0> }
}

#declare braco4 =
 union { cylinder {<0,0,0 >, <L,0,0>, R texture {tinta_A}}
  object{ braco3 rotate a4*y translate <L,0,0> }
}

#declare eixo =
  union {
   cylinder {
     <0,0,0 >,
      <1000,0,0 >,
       0.05
      texture { tinta_B }
   }
 cylinder {
                 <0,0,0 >,
      <0,1000,0>,
     0.05
      texture { tinta_B }
   }
 cylinder {
                 <0,0,0 >,
      <0,0,1000 >,
                 0.05
      texture { tinta_B }
   }

}

   union {
   object {eixo }
   object { braco4 rotate 70*z}

}

#include "camlight.inc"
camlight(<3,3,3>,<27,27,2>,1.00,z,1.0)