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

background{ color rgb < 0.80, 0.80, 1.00 > }

#declare raio = 2.000;

#declare azul =
  texture {
    pigment { color rgb < 0.00, 0.00, 1.00 > }
    finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 }
  }

#declare verde =
  texture {
    pigment { color rgb < 0.00, 1.00, 0.00 > }
    finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 }
  }

#declare vermelho =
  texture {
    pigment { color rgb < 1.00, 0.00, 0.00 > }
    finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 }
  }

#declare preto =
  texture {
    pigment { color rgb < 0.00, 0.00, 0.00 > }
    finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 }
  }

#declare branco =
  texture {
    pigment { color rgbf < 1.00, 1.00, 1.00, 0.5 > }
    finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 }
  }

#declare gold = texture {
  pigment { color rgb <0.8, 0.85, 0.05> }
  finish {
    ambient 0.2
    diffuse 0.3
    specular 0.2  roughness 0.05
    reflection 0.3
  }
}

#declare cilindro_perna =
  cylinder {
    < 0.00, 0.00, 0.00 >,
    < 0.00, 0.00, -10.00 >,
    1.00
    texture { branco }
  }

#declare cilindro_braco =
  cylinder {
    < 0.00, 0.00, 0.00 >,
    < 0.00, 0.00, 3.00 >,
    1.00
    texture { branco }
  }

#declare esfera_cabeca =
  sphere {
    < 0.00, 0.00, 6.50 >,
    3.00
    texture { branco }
  }

#declare esfera_corpo =
  sphere {
    < 0.00, 0.00, 0.00 >,
    5.00
    texture { branco }
  }

#declare esfera_art =
  sphere {
    < 0.00, 0.00, 0.00 >,
    1.00
    texture { branco }
  }

#macro mao()
 box {
      < -1.00, 0.00, -0.50 >,< 1.00, 2.00, 0.50 >
     texture { branco }
   }
#end

#macro antebraco(ome)
 union{
  cylinder{ <0,0,0>,<0,3,0>,1 texture { branco }}
  object{
   mao()
   rotate ome*x
   translate 3*y
  }
 }
#end

#macro braco(mi,ome)
 union{
  cylinder{ <0,0,0>,<0,5,0>,1 texture { branco }}
  object{
   antebraco(ome)
   rotate mi*x
   translate 5*y
  }
 }
#end

#macro superbraco(alfa,gama,mi,ome)
 object{
  braco(mi,ome)
  rotate < alfa, gama, 0 >
 }
#end

#macro pe()
 box {
      < -1.00, 0.00, -1.0 >,< 3.00, 0.50, 1.0 >
     texture { branco }
   }
#end

#macro canela(ome)
 union{
  cylinder{ <0,0,0>,<0,3,0>,1 texture { branco }}
  object{
   pe()
   rotate ome*z
   translate 3*y
  }
 }
#end

#macro perna(mi,ome)
 union{
  cylinder{ <0,0,0>,<0,5,0>,1 texture { branco }}
  object{
   canela(ome)
   rotate mi*z
   translate 5*y
  }
 }
#end

#macro superperna(alfa,mi,ome)
 object{
  perna(mi,ome)
  rotate < 0, 0, alfa >
 }
#end

#if (clock<=0.5)
 #declare cd = -50+100*clock;
 #declare jd = 40-80*clock;
 #declare pd = 30-60*clock;
 #declare ce = 50-100*clock;
 #declare je = 40-80*(clock);
 #declare pes = -90+60*clock;
#end

#if (clock>0.5)
 #declare cd = 50-100*(1-clock);
 #declare jd = 40+80*(1-clock);
 #declare pd = 30-60*(1-clock);
 #declare ce = 50-100*clock;
 #declare je = -40+80*clock;
 #declare pes = 30-60*clock;
#end

#declare md = 50*clock;
#declare me = -30*clock;
#declare ad = 400*clock*(1-clock);
#declare ae = -30*clock;
#declare bdz = -400*clock*(1-clock);;
#declare bez = 0;
#declare bdx = -90;
#declare bex = -90;

object{superbraco(0,0,0,0) translate 4.75*y}
object{superbraco(0,0,0,0) scale < 1, -1, 1> translate -4.75*y}

object{superperna(cd,jd,pd) rotate -90*x translate < 0, -2, -4.0 >}
object{superperna(ce,je,pes) rotate -90*x translate < 0, 2, -4.0 >}

union{
 object{esfera_corpo texture {gold}}
 object{esfera_cabeca}
}

// Original camera parameters:
// #local cam_ctr = <0,0,0>
// #local cam_vec = <40.00,-30,0.00>
// #local cam_sky = z

#include "camlight.inc"
// camlight(<0,0,0>,<10,10,10>,20.0,z,1.0)
camlight(<0,0,0>,<10,-7,5>,35.0,z,1.0)