// Last edited on 2003-12-13 19:28:06 by stolfi
// Exemplo de arquivo de descricao de cena para POV-ray

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

// ======================================================================

#declare ctr = < 1.00, -4.00, 3.00 >;
#declare camDir = < -5.00, 15.00, 0.50 >;

camera {
  location   ctr + 0.70*camDir
  right      1.00*x
  up         1.00*y
  sky        z
  look_at    ctr
}
 

// ======================================================================
// FONTES DE LUZ

light_source {
    < 5.00, 15.00, 10.00 >               // Posição da lâmpada.
    color rgb 1.8 * < 1.00, 1.00, 1.00 > // Intensidade e cor da luz.
} 

light_source {
    < 15.00, 5.00, 10.00 >               // Posição da lâmpada.
    color rgb 0.8 * < 1.00, 1.00, 1.00 > // Intensidade e cor da luz.
} 

light_source {
    < -15.00, 5.00, 10.00 >               // Posição da lâmpada.
    color rgb 0.5 * < 1.00, 1.00, 1.00 > // Intensidade e cor da luz.
} 

// ======================================================================
// DESCRIÇÃO DA CENA 

sky_sphere { 
   pigment { Blue_Sky }
}

#declare oblob =
   blob {
      threshold 0.3

      sphere {
         < 1.00, -4.00, 3.00 >, 5.50,
         1
         texture { T_Stone36 }
      }

      #declare aux = (1 - clock) * (-0.90) + (clock) * (0.90);
      cylinder {
         < 0.00, 0.00, 3.00 >, < 2.00, 0.00, 3.00 >, 1.00
         aux
         pigment { color Green }
      }

      sphere {
         < 0.80, -0.30, 1.80 >, 0.80,
         aux
         pigment { color Yellow }
      }

      sphere {
         < 1.25, -0.30, 1.80 >, 0.80,
         aux
         pigment { color Yellow }
      }

      sphere {
         < 1.70, -0.30, 1.80 >, 0.80,
         aux
         pigment { color Yellow }
      }

      sphere {
         < 1.30, -0.60, 0.80 >, 0.80,
         aux
         pigment { color Blue }
      }

   }


// Aqui está a cena, finalmente:
union {
   object { oblob }
}