// Last edited on 2007-07-23 15:09:52 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 raio1 = 2.000;

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

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

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

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

#declare cabeca =
  sphere {
    < 0.00, 0.00, 0.00 >, raio1
    texture { tinta_cinza }
    translate < 0, 5, 0>
  }

#declare capacete =
  sphere {
    < 0.00, 0.00, 0.00 >, 2.2
    texture { tinta_amarela }
    translate < 0, 5, 0>
  }

#declare corte =
  box{
        <-3, 0, -3>, <3, -3, 3>
        texture { tinta_amarela }
 translate < 0, 5, 0>
    }

#declare visao =
  box{
        <1.7, 1, 1.3>, <-1.7, 0.3, 3>
        texture { tinta_cinza }
 translate < 0, 5, 0>
    }

#declare olho1 =
  sphere {
    < -0.80, 0.60, 1.8 >, 0.2
    texture { tinta_preta }
    translate < 0, 5, 0>
  }

#declare olho2 =
  sphere {
    < 0.80, 0.60, 1.8 >, 0.2
    texture { tinta_preta }
    translate < 0, 5, 0>
  }

#declare nariz =
  sphere {
    < 0.00, -0.50, 2 >, 0.7
    texture { tinta_cinza }
    translate < 0, 5, 0>
  }

#macro bigode (angulo)
  box{
        < 1.5, -0.45, 2.7>, <-1.5, -0.55, 2.68>
        texture { tinta_preta }
 rotate < 0, 0, angulo >
 translate < 0, 5, 0 >
    }
#end

#macro orelha ( eixox, eixoy, eixoz )
  sphere {
    < eixox, eixoy, eixoz >, 1
    texture { tinta_cinza }
    translate < 0, 5, 0>
  }
#end

#declare corpo =
  sphere {
    < 0.00, -4.5, 0 >, 3
    texture { tinta_amarela }
    translate < 0, 5, 0>
  }

#macro cone_util (xb, yb, zb, rb, xc, yc, zc, rc)
    cone{
        <xb, yb, zb>, rb,
        <xc, yc, zc>, rc
        texture { tinta_amarela }
        translate < 0, 5, 0>
    }
#end

#macro membro (xb, yb, zb, rb, xc, yc, zc, rc)
    cone{
        <xb, yb, zb>, rb,
        <xc, yc, zc>, rc
        texture { tinta_cinza }
        translate < 0, 5, 0>
    }
#end

#macro junta ( eixox, eixoy, eixoz, raio )
  sphere {
    < eixox, eixoy, eixoz >, raio
    texture { tinta_cinza }
    translate < 0, 5, 0>
  }
#end

#macro antebraco ( eixox, eixoy, eixoz)
   union{
     object {
        membro (0, 0, 0, 0.5, -2, 0, 0, 0.5 )
        rotate eixoy * y
 rotate eixox * x
 rotate eixoz * z
        translate<-4.5, -2.5, 0>
     }
   }
#end

#macro braco (eixox, eixoy, eixoz)
   union{
     object{
       junta (-2.5, -2.5, 0, 0.6)
       rotate eixox * x
       rotate eixoy * y
       rotate eixoz * z
     }
     object {
        membro ( -2.5, -2.5, 0, 0.5, -4.5, -2.5, 0, 0.5 )
        rotate eixox * x
 rotate eixoy * y
 rotate eixoz * z
     }
     junta (-4.5, -2.5, 0, 0.6)
     object {
        antebraco ( x, y, z)
     }
   }
#end

difference {
  object { capacete }
  object { visao }
  object { corte }
}

object { cabeca }
object { olho1 }
object { olho2 }
object { nariz }
bigode(10)
bigode(0)
bigode(-10)
orelha ( -1.7, 1.7, -1.7 )
orelha ( 1.7, 1.7, -1.7 )
object { corpo }
cone_util (0, -7.5, 0, 3, 0, -4.5, 0, 3 )

braco(0, 0, 0)

// Original camera parameters:
// #local cam_ctr = <0,0,0>
// #local cam_vec = <-15.00,10.00,16>
// #local cam_sky = y

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