// Last edited on 2007-07-23 14:00:14 by stolfi
// Processed by remove-cam-lights

global_settings { max_trace_level 12 }

#declare tinta_xadrez =
  texture {
    pigment { checker color rgb <0.40,0.50,0.60>, color rgb <0.90,0.95,1.00> }
    finish { ambient 0.6 diffuse 0.4 }
  }

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

#declare raio = 2.000;

#declare tinta_azul =
  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_ouro =
  texture {
    pigment { color rgb < 1.00, 0.80, 0.10 > }
    finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.2 reflection 0.2}
  }

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

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

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

#declare tinta_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 tinta_branco =
  texture {
    pigment { color rgb < 1.00, 1.00, 1.00 > }
    finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 }
  }

#declare tinta_marfim =
  texture {
    pigment { color rgb < 1.00, 1.00, 1.00 > }
    finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.2 reflection 0.2}
  }

#declare cabeca =
  union {
 sphere {
 < 0.00, 0.00, 2.35 >, 1.00
 texture {tinta_marfim}
 }
 sphere {
 < 0.70, 0.70, 1.85 >, 0.25
 texture {tinta_preto}
 }
 sphere {
 < 0.40, 0.90, 2.15 >, 0.15
 texture {tinta_rubi}
 interior {ior 2.417}
 }
 sphere {
 < 0.90, 0.40, 2.15 >, 0.15
 texture {tinta_rubi}
 interior {ior 2.417}
 }
 sphere {
 < 1.30, 0.40, 2.85 >, 0.5
 texture {tinta_preto}
 interior {ior 2.417}
 }
 sphere {
 < 0.40, 1.30, 2.85 >, 0.5
 texture {tinta_preto}
 interior {ior 2.417}
 }
}

#macro mao()
 sphere {
  < 0.00, 0.00, 0.00 >, 0.35
  texture {tinta_marfim}
  }

#end

#macro punho(pun_ang)
union{
 sphere {
  < 0.00, 0.00, 0.00 >, 0.45
  texture {tinta_branco}
 }
 object {
  mao()
  rotate pun_ang*z
  translate 0.45*x
 }

}
#end

#macro braco(pun_ang)
union {
 cylinder {
  <2,0,0>,
  <0,0,0>,
  0.45
  texture {tinta_marfim}
  }

 object {
  punho(pun_ang)
  translate 2.0*x
 }
}
#end

#macro ombro(pun_ang, omb_ang)
union {
 sphere {
  < 0.00, 0.00, 0.00 >, 0.45
  texture {tinta_branco}
 }

 object {
  braco(pun_ang)
  rotate omb_ang*z
  translate 0.45*x
 }
}
#end

#macro pe()
 sphere {
  < 0.00, 0.00, 0.00 >, 0.35
  texture {tinta_marfim}
  }

#end

#macro tornozelo(tor_ang)
union{
 sphere {
  < 0.00, 0.00, 0.00 >, 0.45
  texture {tinta_branco}
 }
 object {
  pe()
  rotate tor_ang*z
  translate 0.45*x
 }
}
#end

#macro perna(pun_ang)
union {
 cylinder {
  <2,0,0>,
  <0,0,0>,
  0.45
  texture {tinta_marfim}
  }

 object {
  tornozelo(tor_ang)
  translate 2.0*x
 }
}
#end

#macro coxa(tor_ang, cox_ang)
union {
 sphere {
  < 0.00, 0.00, 0.00 >, 0.45
  texture {tinta_branco}
 }

 object {
  perna(tor_ang)
  rotate cox_ang*z
  translate 0.45*x
 }
}
#end

#macro membros(pun_ang, omb_ang, tor_ang, cox_ang)
union {

 object {
  ombro(pun_ang, omb_ang)
  rotate -45*y
  translate 0.7*z
  translate 1.5*x
 }

 object {
  coxa(pun_ang, omb_ang)
  rotate 45*y
  translate -1.3*z
  translate 1.5*x
 }

}
#end

#declare barriga =
 sphere {
 < 0.00, 0.00, 0 >, 1.5
 texture {tinta_marfim}
 }

union {
 object {cabeca}
 object {barriga}
 object {
  membros(10,40,-20,60)
 }
 object {
  membros(-30,20,50,-30)
  scale <-1,1,1>
 }
}

// Original camera parameters:
// #local cam_ctr = <0,0,0>
// #local cam_vec = <7.00,7.00,-3.00>
// #local cam_sky = z

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