// Last edited on 2003-12-14 20:19:44 by stolfi
// Exemplo de arquivo de descricao de cena para POV-ray

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

#include "colors.inc"

#declare ctr = < 2.00, 0.00, 0.00 >;
#declare camDir = (< 2.00, -12.00, 0.00 >) - (< 2.00, 0.00, 0.00 >);

camera {
  location   ctr + 1.00*camDir
  right      -0.75*x
  up         0.75*z
  sky        z
  look_at    ctr
}
 

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

light_source {
  10 * < +30.0, +30.0, +30.0 >              // Posição da lâmpada.
  color rgb 1.2 * < 1.00, 1.00, 1.00 >   // Intensidade e corda luz.
} 

light_source {
  10 * < +50.0, -10.0, +10.0 >             // Posição da lâmpada.
  color rgb 0.8 * < 1.00, 1.00, 1.00 >   // Intensidade e corda luz.
} 

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

background{ color rgb < 1, 1, 1 > }

#declare cor_cristal = <0.70, 0.70, 0.90>;
#declare tx_cristal =
texture{
   finish{
  ambient 0.1 diffuse 0.1
  reflection 0.25
  specular 1 roughness 0.001
  }
   pigment {color cor_cristal filter 1}
}


#declare espelho_ouro = <0.8,0.7,0.50>;
#declare tx_esp_ouro =
   texture{
      pigment{rgb espelho_ouro}
      finish{
         ambient 0.05 diffuse 0.05
   reflection espelho_ouro
   specular 0.20 roughness 0.05
      }
   }


#declare l=
  difference{
    box{
      <0,0.5,0>,
      <1.5,-0.5,2>
    }
    box{
      <0.3,0.6,0.3>,
      <1.6,-0.6,2.1>
    }
    texture {tx_cristal}
  }

#declare i=
  union{
    cylinder{  
      <2,0,0>,
      <2,0,2>
      0.3
      texture {tx_esp_ouro}
    }  
    sphere{
      <2,0,2.5>,
      0.3
      texture {tx_esp_ouro}      
    }
  }
  
#declare ve=
  cone{  
    <3.5, 0, 0>, 0    // Center and radius of one end
    <3.5, 0, 2>, 1.0    // Center and radius of other end
    texture {tx_cristal}
  }

#declare boca=
  difference {
    cylinder{  
      <2.3,-0.5,0>,
      <2.3,0.5,0>,
      3
      pigment{Red}
    
    }
    union{
      cylinder{
      <2.3,-0.6,0>,
      <2.3,0.6,0>,
      2.7
      }
      box{
      <-1,0.6,0>,
      <6,-0.6,4>  
      }
      pigment{Red}
    }
    translate <-0.25,0,0>
  }
union{
  object{l}
  object{i}
  object{ve}
  object{boca}
}