// Last edited on 2007-07-23 19:52:59 by stolfi
// Processed by remove-cam-lights

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

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

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

#declare prata =
  texture {
    pigment { color rgb < 0.75, 0.75, 0.75 > }
    finish { diffuse 0.7 specular 0.5 roughness 0.005 ambient 0.2 reflection 0.0 }
  }

#declare cor_ouro = < 1.0, 0.8, 0.1 >;

#declare dourado =
  texture {
    pigment { rgb cor_ouro }
    finish {
      ambient 0.05 diffuse 0.05
      reflection cor_ouro
      specular 0.20 roughness 0.05
    }
  }

#declare rosto =
   sphere {
 <0, 0,8> 2
 texture { prata }
}

#declare olho =
   sphere {
   <0.5,-2,7.9>
   0.3
   texture { tinta_A }
}

#declare corpo =
   cone {
 <0,0,2>, 2.5
 <0,0,6>, 1.5
 texture { tinta_B }
}

#macro mao()
  sphere{
 <0,0,0>, 1 texture { prata }
 scale <2, 1, 1>
  }
#end

#macro antebraco(alfa)
   union {
    cylinder { <0,0,0>, <4,0,0>, .5 texture { tinta_B } }
 object { mao()
  rotate alfa*y
  translate 4*x
 }
   }
#end

#macro braco(alfa, beta)
   union {
    cylinder { <0,0,0>, <4,0,0>, .5 texture { tinta_B } }
 object { antebraco(beta)
  rotate alfa*y
  translate 4*x
 }

   }
#end

#macro pe()
  sphere{
 <-1,0,0>, 0.8 texture { prata }
 scale <2, 1, 1>
  }
#end

#macro canela(alfa)
   union {
    cylinder { <-1,0,0>, <-1,0,4>, .5 texture { tinta_B } }
 object { pe()
  rotate alfa*y
  translate 4*z
 }
   }
#end

#macro perna(alfa, beta)
   union {
    cylinder { <-1,0,0>, <-1,0,4>, .5 texture { tinta_B } }
 object { canela(beta)
  rotate alfa*y
  translate 4*z
 }
   }
   scale <0, 0, 0.4>
#end

union {
 object {rosto}
 object { olho }
 object { olho
   translate <-1,0,0>
 }

object { corpo }

#declare a1=-345*clock*(1-clock);
#declare a2=-40*clock*(1-clock);
#declare b2=120*clock;
#declare b1=2*clock;
#declare a3=-10+clock*20;
#declare a4=-10+clock*20;
#declare b3=10*clock*(1-clock);
#declare b4=10*clock*(1-clock);

object { braco(a2,b2) translate 5*z}
object { braco(a1,b1) translate 5*z scale <-1,1,1>}
object { perna(a3,b3) rotate 180*y translate <0,0,2>}
object { perna(a4,b4) rotate 180*y translate <0.5,0,2> scale <-1,1,1> }

}
plane { z, -2
    texture {
      pigment { checker <0.5,0.5,0.5>, <1,1,1> }
      finish { ambient 0.6 diffuse 0.4 }
    }
  }

// Original camera parameters:
// #local cam_ctr = <0.00,0.00,7.00>
// #local cam_vec = (<0,-9,5.00>-<0.00,0.00,7.00>)
// #local cam_sky = z

#include "camlight.inc"
camlight(<0,0,5>,<7,10,5>,24.0,z,1.0)