// Last edited on 2005-01-05 23:28:13 by stolfi
// Processed by remove-cam-lights

background{ color rgb < 0.25, 0.20, 0.85 > }

#declare textura1 =
  texture {
    pigment {color rgb <0.5,0.5,0.5>}
    finish {
      ambient 0.2 diffuse 0.8
      reflection 0.1
      specular 0.90 roughness 0.005
    }
  }

#declare textura2 =
  texture {
    pigment {color rgb <0.8,0.5,0.5>}
    finish {
      ambient 0.2 diffuse 0.8
      reflection 0.1
      specular 0.90 roughness 0.005
    }
  }

#declare raioArtic = 3;
#declare segBracoSize = 20;
#declare baseH = 5;

#declare a1 = clock*35;
#declare a2 = -20 - clock*20;
#declare a3 = -20 - clock*20;
#declare a4 = -20 - clock*70;
#declare a5 = 65 - clock*105;

#declare segBraco =
  union {
    cylinder {
      <0, 0, 0>, <segBracoSize, 0, 0>, 2
      texture {textura1}
    }
    sphere {
      <segBracoSize, 0, 0>, raioArtic
      texture {textura2}
    }
  }

#declare meiaGarra =
  object {
    difference {
      cone {
        <0, 0, 0>, 2, <0, 10, 0>, 0.5
      }
      box {
        <-10, -1, -10>, <0, 11, 10>
      }
    }
    rotate 90*z
    texture {textura1}
  }

#declare garra =
  object {
    union {
      object {meiaGarra rotate -a1*z}
      object {meiaGarra rotate 180*x rotate a1*z}
    }
    rotate 180*y
  }

#declare braco1 =
  union {
    object {segBraco}
    object {garra translate (raioArtic*0.6)*x rotate a2*z translate segBracoSize*x}
  }

#declare braco2 =
  union {
    object {segBraco}
    object {braco1 rotate a3*z translate segBracoSize*x}
  }

#declare braco3 =
  union {
    object {segBraco}
    object {braco2 rotate a4*z translate segBracoSize*x}
  }

#declare base =
  union {
    box {
      <-15,0,-15>, <15, baseH, 15>
      texture {textura1}
    }
    object {braco3 rotate 90*z rotate a5*y translate baseH*y}
  }

plane {y, 0
  texture {
    pigment{checker <0.2,0.2,0.2>,<0.3,0.3,0.3>}
    finish {ambient 0.2 diffuse 0.8 reflection 0.05}
    scale 30.0
  }
}

object {
  base

}

#include "camlight.inc"
camlight(<0,30,0>,<110,30,200>,1.00,y,1.0)