// Last edited on 2007-07-23 23:32:48 by stolfi
// Processed by remove-cam-lights

// plane { < 0,0,15 > , -1
//   pigment { checker color rgb <  1, 1, 1 >, color rgb< 0, 0, 0 > }
// }

background{ color rgb < 0, 0, 0 > }

#declare tinta_verde =
  texture {
    pigment { color rgb< 0, 1, 0 > }
    finish { diffuse 0.5 specular 0.3 roughness 0.005 ambient 0.2  }
}

#declare tinta_azul =
  texture {
    pigment { color rgb< 0, 0, 1 > }
    finish { diffuse 0.5 specular 0.3 roughness 0.005 ambient 0.2  }
}

#declare tinta_ouro =
  texture {
    pigment { color rgb< 1, 0.65, 0 > }
    finish { diffuse 0.5 specular 0.3 roughness 0.005 ambient 0.2  }
}

#declare tinta_rubi =
  texture {
    pigment { color rgb< 0.83, 0.33, 0.13 > filter 1.0}

}

#declare tinta_esmeralda =
  texture {
    pigment { color rgb< 0.37, 0.74, 0.28 > }
    finish { diffuse 0.5 specular 0.3 roughness 0.005 ambient 0.2  }
}

#declare tinta_cinza =
  texture {
    pigment { color rgb< 0.85, 0.89, 0.92 > }
    finish { diffuse 0.5 specular 0.3 roughness 0.005 ambient 0.2  }
}

box { < -100, 0.1, 0.1 >, < 100, -0.1, -0.1>
    texture { tinta_ouro }
}

box { < 0.1, -100, 0.1 >, < -0.1, 100, -0.1>
    texture { tinta_ouro }
}

box { < 0.1, 0.1, -100 >, < -0.1, -0.1, 100>
    texture { tinta_ouro }
}

#declare olho1 =
  sphere { < 6.0, -25.0, 100.0 >, 3
    texture{ tinta_rubi }
  }

#declare olho2 =
  sphere { < -6.0, -25.0, 100.0 >, 3
    texture{ tinta_rubi }
  }

#declare cabeca =
  sphere { < 0.0, -8.0, 100.0 >, 15
    texture{ tinta_verde }
  }

#declare labio1 =
    cylinder { < -2.5, -25, 95 >, < 2.5, -25, 95 >, 1
      texture{ tinta_rubi }
    }

#declare labio2 =
    cylinder { < -2.5, -25, 92 >, < 2.5, -25, 92 >, 1
      texture{ tinta_rubi }
    }

#declare peito =
  sphere { < 0.0, 0.0, 80.0 >, 22
    texture{ tinta_verde }
  }

#declare abdomem =
  sphere { < 0.0, 0.0, 55.0 >, 25
    texture{ tinta_verde }
  }

#declare espada =
  cone { < 0, 0, 0>, 3, < 45, 0, 0>, 0.00001
      texture { tinta_ouro }
  }

#macro mao()
union {
  cone { < 0, 0, 0>, 3, < 15, 0, 0>, 0.00001
      texture { tinta_cinza }
      rotate 45 * y
      }

  cone { < 0, 0, 0>, 3, < 15, 0, 0>, 0.00001
      texture { tinta_cinza }
      rotate -45 * y
      }
}
#end

#macro mao_espada()
union {
  cone { < 0, 0, 0>, 3, < 15, 0, 0>, 0.00001
      texture { tinta_cinza }
      rotate 45 * y
      }

  cone { < 0, 0, 0>, 3, < 15, 0, 0>, 0.00001
      texture { tinta_cinza }
      rotate -45 * y
      }
  object {
    espada
  }
}
#end

#macro antebraco()
  union {
    cylinder{ < 0, 0, 0 >, < 20, 0, 0 >, 5
      texture{ tinta_verde }
    }
    object { mao()
             translate 20 * x
    }
  }
#end

#macro antebraco_espada()
  union {
    cylinder{ < 0, 0, 0 >, < 20, 0, 0 >, 5
      texture{ tinta_verde }
    }
    object { mao_espada()
             translate 20 * x
    }
  }
#end

#macro braco(alfa)
  union {
    cylinder{ < 0, 0, 0 >, < 20, 0, 0 >, 5
      texture{ tinta_verde }
    }
    sphere{ <0, 0, 0>, 5
      texture{ tinta_verde }
      translate 20 * x
    }
    object { antebraco()
             rotate alfa * y
             translate 20 * x
    }
  }
#end

#macro braco_espada(alfa)
  union {
    cylinder{ < 0, 0, 0 >, < 20, 0, 0 >, 5
      texture{ tinta_verde }
    }
    sphere{ <0, 0, 0>, 5
      texture{ tinta_verde }
      translate 20 * x
    }
    object { antebraco_espada()
             rotate alfa * y
             translate 20 * x
    }
  }
#end

#macro superbraco(alfa, delta, epsilon)
  union {
    object { peito }
    object {
      braco(alfa)
      rotate delta * y
      rotate epsilon * z
    }
  }
#end

#macro superbraco_espada(alfa, delta, epsilon)
  union {
    object { peito }
    object {
      braco_espada(alfa)
      rotate delta * y
      rotate epsilon * z
    }
  }
#end

#macro pe()
  box { < -5, -15, 0 >, < 5, 5, 5 >
    texture { tinta_cinza }
  }
#end

#macro anteperna(gama)
  union {
    cylinder{ < 0, 0, 0 >, < 0, 0, 21 >, 5
      texture{ tinta_verde }
      rotate gama * x
      translate 5 * z
    }
    sphere{ <0, 0, 0>, 6
      texture{ tinta_verde }
      translate 20 * z
      rotate gama * x
    }
    object { pe()
    }
  }
#end

#macro perna(gama, beta)
  union {
    cylinder{ < 0, 0, 0 >, < 0, 0, 21 >, 5
      texture{ tinta_verde }
             translate -20 * z
             rotate -gama * x
             translate 40 * z
    }
    object { anteperna(gama)

    }
  }
#end

union {
  object { olho1 }
  object { olho2 }
  object { labio1 }
  object { labio2 }
  object { cabeca }
  object { peito }
  object { abdomem }

  object { superbraco(90 - (90 * clock), 0, 45 * clock)
    translate 15 * x
    translate 85 * z
  }

  object { superbraco_espada(-45 + (45 * clock), -90 + 150 * clock, -45)
    translate 15 * x
    translate 85 * z
    scale < -1, 1, 1 >
  }

  object { perna(15 - 15 * clock, 0)
    translate 10 * x
  }

  object { perna(15 - 15 * clock, 0)
    translate 10 * x
    scale < -1, 1, 1 >
  }
}

// Original camera parameters:
// #local cam_ctr = <0.00,0.00,60.00>
// #local cam_vec = (<20.00,-180.00,80.00>-<0.00,0.00,60.00>)
// #local cam_sky = z

#include "camlight.inc"
// camlight(<0.00,0.00,60.00>,<10,10,10>,20.0,z,1.0)
camlight(<0,0,100>,<6,-10,4>,250.0,z,1.0)