// Last edited on 2003-04-13 22:54:46 by stolfi
// Autor: Mário Riudoms Sangenis  -  RA: 992198

#include "colors.inc"
#include "textures.inc"

background{ color rgb 0.5*< 1.00, 1.00, 1.00 > }

#if (clock < 0.5)
  #declare rotacao = (90)*(2*clock/0.5);
  #declare altura = 0;
  #declare delta = 100;
  #declare posicao = 10*clock;
#else
  #declare rotacao = 360;
  #declare altura = -clock;
  #declare delta = 0;
  #declare posicao = 5;
#end

#declare ctr = < 0.00, -2.00,  0.00 >;
#declare cam = < 0.00, -1.00, 18.00 >;

camera {
  location  ctr + cam - 2*posicao*z
  right     -1.2*x 
  up        0.9*y 
  sky       y
  look_at   ctr
} 

light_source {
  ctr + 10*(vrotate(cam, 20*y) + 25*y)
  color rgb  1.2*< 1.00, 0.90, 0.90 >
} 

light_source {
  ctr + 10*(vrotate(cam, -70*y) + 25*y)
  color rgb 0.8*< 1.00, 1.00, 1.00 >
} 

#declare bastao =
  cylinder{ < 0.00, -1.00, 0.00 >, < 0.00, 1.00, 0.00 >, 0.10 
            rotate <0,0,45> pigment {Black}
}

#declare LORD =
  text { 
    ttf "arial.ttf"
    "LORD"
    0.30, 0
    pigment { BrightGold }   // estava faltando -- acrescentado por stolfi
    finish { ambient 0.5 diffuse 0.5 }  // estava faltando -- acrescentado por stolfi
}

#declare RING =
  text { 
    ttf "arial.ttf"
    "RING"
    0.30, 0
    pigment { BrightGold } // estava faltando -- acrescentado por stolfi
    finish { ambient 0.5 diffuse 0.5 }  // estava faltando -- acrescentado por stolfi
}

#declare OF =
  text { 
    ttf "arial.ttf"
    "OF THE"
    0.30, 0
    pigment { Red } // estava faltando -- acrescentado por stolfi
    finish { ambient 0.5 diffuse 0.5 }  // estava faltando -- acrescentado por stolfi
}

#declare plano =
  plane {
  y, -4.0
  pigment {checker color Black, color White }
}

// Aqui está a cena, finalmente:

union { 
 
  object { plano }
  object { bastao rotate<0,0,rotacao> translate<5-posicao,1.9*altura,0>}
  object { bastao rotate<0,0,rotacao> scale<-1,0,0> translate<posicao-5,1.9*altura,0>} 
  object { LORD translate <posicao-9.0,-0.5,0> }	
  object { RING translate <6.5-posicao,-0.5,0> }	
  object { OF translate <-1.7,4.5+5*altura+delta,0> scale <0.5,0.5,0.5> }
}