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

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

#declare raio = 2.000;

#declare tinta_A =
  texture {
    pigment { color rgb < 1.0, 0.7, 0.60 > }
    finish { diffuse 0.3 specular 0.3 roughness 0.5 ambient 0.2}
  }

#declare tinta_B =
  texture {
    pigment { color rgb < 1.00, 0.5, 0.20 > }
    finish { diffuse 0.3 specular 0.3 roughness 0.5 ambient 0.2}
  }

#declare tinta_C =
  texture {
    pigment { color rgb < 1.00, 0.7, 0.00 > }
    finish { diffuse 0.3 specular 0.3 roughness 0.05 ambient 0.2 reflection 0.6  }
  }

#declare tinta_D =
  texture {
    pigment { color rgb < 0.85, 0.55, 0.00 > filter 1.0}
    finish { diffuse 0.3 specular 0.3 roughness 0.05 ambient 0.2 reflection 0.9 }
  }

#declare tinta_E =
  texture {
    pigment { color rgb < 1.00, 1.00, 1.00 > }
    finish { diffuse 0.3 specular 0.3 roughness 0.05 ambient 0.2}
  }

#declare pescoco =
  cylinder{
  <0.0, 0.0, 0.0>,
  <0.0, 0.0, 1.0>,
  0.25
  texture {tinta_D}
  }

#declare braco_espada =
  cone{
  <0.0 , 0.0 , 0.0>,0.10
  <0.0 , 0.0 , 3.0>,0.50
  texture {tinta_E}
  }

#declare braco_perna =
  cylinder{
  <0.0, 0.0, 0.0>,
  <0.0, 0.0, 2.0>,
  0.50
  texture {tinta_D}
  }

#declare pe =
  box{<0.0, 0.0, 0.0>,
      <1.0, 1.0, 1.0>
      texture{tinta_E}
     }

#declare junta_braco =
  sphere{
  <0.0, 0.0, 0.0>, 0.5
   texture {tinta_B}
   }

#declare cabeca =
  sphere{
  <0.0, 0.0, 0.0>, 1.0
   texture {tinta_C}
   }

#declare corpo =
  box{<0,0,0>,
      <4,1,5>
      texture{tinta_A}
     }

#macro translada(ax, ay, az, param, bx, by, bz)

    #if(param = 1)
    object{cabeca translate<ax, ay, az> rotate<bx,by,bz>}
    #end

    #if(param = 2)
    object{pescoco translate<ax, ay, az>}
    #end

    #if(param = 3)
    object{corpo translate<ax, ay, az> rotate<bx,by,bz>}
    #end

    #if(param = 4)
    object{braco_perna translate<ax, ay, az> rotate<bx, by, bz>}
    #end

    #if(param = 5)
    object{junta_braco translate<ax, ay, az>}
    #end

    #if(param = 6)
    object{braco_espada translate<ax, ay, az> rotate<bx, by, bz>}
    #end

#end

#macro braco_direito(rot_br_dir)

    union{
        translada(0,0,0,4,0,0,0)
        translada(0,0,-0.5,5,0,0,0)
        translada(0,0,-3.0,4,-30,rot_br_dir,0)
        rotate<0,90,0>
         }

#end

#macro braco_esquerdo(rot_br_esq)

    union{
        translada(0,0,0,4,0,0,0)
        translada(0,0,-0.5,5,0,0,0)
        translada(0,0,-3.0,4,-30,rot_br_esq,0)
        rotate<0,90,0>
        translate<-8,1,0>
        scale<-1,1,1>
         }

#end

#macro cabeca_pescoco(rot_cab_pes)

    union
    {
       translada(4,0,1.2,2,0,0,0)
       translada(4,0,3.2,1,0,0,0)
       rotate<rot_cab_pes,0,0>
    }

#end

#macro perna_direita(rot_per_dir)

      translada(3.0,0.5,-5.5,4,rot_per_dir,0,0)

#end

#macro perna_esquerda(rot_per_esq)

      translada(5.0,0.5,-5.5,4,rot_per_esq,0,0)
#end

#macro torax_abd(rot_torax)

      translada(2.0,0,-3.5,3,rot_torax,0,0)
#end

#macro guerreiro(brac_dir, brac_esq, torax, cab_pec, per_dir, per_esq)

#declare A7 = -10*clock;

union{
      braco_direito(brac_dir)
      braco_esquerdo(brac_esq)
      torax_abd(torax)
      cabeca_pescoco(cab_pec)
      perna_direita(per_dir)
      perna_esquerda(per_esq)
      translate<0,A7,0>
      }

#end

#declare A1=-50+100*clock;
#declare A2=-70+120*clock;
#declare A3=15-30*clock;
#declare A4=-40+100*clock;
#declare A5=20-40*clock;
#declare A6=-20+40*clock;

guerreiro(0,0,0,0,A5,A6)

// Original camera parameters:
// #local cam_ctr = <0,0,0>
// #local cam_vec = <16.00,19.00,8.00>
// #local cam_sky = z

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