// Last edited on 2009-07-24 13:49:24 by stolfilocal
// Processed by remove-cam-lights

#include "colors.inc"

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

plane{
   y, 0
   texture { pigment { rgb < 0.7, 1.0, 0.7 > }
     finish { diffuse 0.8 ambient 0.2 }
   }
}

#macro folha()
  union {
    box { < 0.0, -0.2, -0.3 > , < 5.0, 0.2, 0.3 >
      texture { pigment { rgb < 1.0, 0.3, 0.2 > } }
    }
      difference {
 sphere {
   < 6.0, 0.0, 0.0 >, 1.0
   texture { pigment { rgb < 0.3, 0.5, 1.0 > } }
 }
 box { < 0.0, 0.2, -1.0 >, < 10.0, 2.0, 1.0 > }
      }
  }
#end

#macro punho()
  union {
    sphere { < 0.0, 0.0, 0.0 > , 2.0 
      texture { pigment { rgb < 0.3, 0.5, 1.0 > } }
    }
    
    object { folha()
      
      translate < 0.0, 0.0, 0.0 >
    }
  }
#end

#macro antebraco( rotaciona_x_punho, rotaciona_y_punho )
  union {
    cylinder { < 0.0, 0.0, 0.0 > , < 10.0, 0.0, 0.0 >, 2.0 
      texture { pigment { rgb < 1.0, 0.3, 0.2 > } }
    }
    
    object { punho()
      rotate < rotaciona_x_punho, rotaciona_y_punho, 0.0 >
      translate < 10.0, 0.0, 0.0 >
    }
  }
#end

#macro braco( rotaciona_y_antebraco, rotaciona_x_punho, rotaciona_y_punho )
  union {
    union {
      cylinder { < 0.0, 0.0, 0.0 > , < 10.0, 0.0, 0.0 >, 2.0 
 texture { pigment { rgb < 0.3, 0.3, 1.0 > } }
      }
      sphere { < 10.0, 0.0, 0.0 >, 2.0
 texture { pigment { rgb < 0.3, 0.3, 1.0 > } }
      }
    }
    
    object { antebraco( rotaciona_x_punho, rotaciona_y_punho )
      rotate < 0.0, rotaciona_y_antebraco, 0.0 >
      translate < 10.0, 0.0, 0.0 >
    }
  }
#end

#macro talheres_modernos( rotaciona_x_braco, rotaciona_z_braco, rotaciona_y_antebraco, rotaciona_x_punho, rotaciona_y_punho )
  union {
    union {
      cylinder { < 0.0, 0.0, 0.0 > , < 0.0, 5.0, 0.0 >, 2.0 
 texture { pigment { rgb < 1.0, 0.3, 0.2 > } }
      }
      sphere { < 0.0, 5.0, 0.0 >, 2.0
 texture { pigment { rgb < 1.0, 0.3, 0.2 > } }
      }
    }
    
    object { braco( rotaciona_y_antebraco, rotaciona_x_punho, rotaciona_y_punho )
      rotate < rotaciona_z_braco, 0.0, rotaciona_z_braco >
      translate < 0.0, 5.0, 0.0 >
    }
  }
#end

union{
  object { talheres_modernos( 0.0, 10.0, -60, 45, -45 ) }
  object { talheres_modernos( 30.0, 50.0, 80, -45, 20 )
    rotate < 0.0, 180, 0.0 >
    translate < -10.0, 0.0, 0.0 >
  }
}

// Original camera parameters:
// #local cam_ctr = <0.00,15.00,0.00>
// #local cam_vec = (<20.00,25.00,60.00>-<0.00,15.00,0.00>)
// #local cam_sky = y

#include "camlight.inc"
camlight(<0.00,15.00,0.00>,<-2,3,10>,60.0,y,1.0)