// Exemplo de arquivo de descricao de cena para POV-ray
// Last edited on 2003-07-31 12:50:37 by stolfi

#include "colors.inc"


// ======================================================================
// CÂMERA 

camera {
  location  <  15.00, 17.00, 15.00 >  // Posição do observador.
  right     < -0.60, 0.00, 0.00 >                 // Largura RELATIVA da imagem.
  up        < 0.00, 0.80, 0.00 >                 // Altura RELATIVA da imagem.      
  sky       < 0.00, 1.00, 0.00 >                      // Qual direção é "para cima"?
  look_at   <  0.00, 5.00, 0.00 >  // Para onde a câmera está apontando.
} 
// Nota: os parâmetros "right" e "up" devem ter a mesma proporção
// que os parâmetros ${WIDTH} e ${HEIGHT} no Makefile.

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

light_source {
  10 * < +50.0, +30.0, +50.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, 20.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 < 0.75, 0.80, 0.85 > }

#declare raio = 2.000;

#declare cor_cristal = <1.00, 0.0, 0.0>;
#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 cor_cristal2 = <0.10, 0.90, 1.00>;
#declare tx_cristal2=
 texture{
   finish{
      ambient 0.1 diffuse 0.1 reflection 0.25  specular 1 roughness 0.001
   }
   pigment { color cor_cristal2 filter 1}
 }
 
 #declare cor_espelho = <1.00, 0.80, 0.10>;
 #declare tx_espelho =
  texture{
   pigment{ rgb cor_espelho }
   finish{
    ambient 0.05 diffuse 0.05 reflection cor_espelho  specular 0.20 roughness 0.05
   }
  }
  
  #declare cor_espelho2 = <0.10, 0.80, 1.00>;
 #declare tx_espelho2 =
  texture{
   pigment{ rgb cor_espelho2 }
   finish{
    ambient 0.05 diffuse 0.05 reflection cor_espelho2  specular 0.20 roughness 0.05
   }
  }
 

#declare tinta_A = 
  texture {
    pigment { color rgb < 0.10, 0.80, 1.00 > }
    finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 }
  }

#declare tinta_B = 
  texture {
    pigment { color rgb < 1.00, 0.80, 0.10 > }
    finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 }
  }

#declare vermelho = 
  texture {
    pigment { color rgb < 1.00, 0.00, 0.00 > }
    finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 }
  }

#declare verde = 
  texture {
    pigment { color rgb < 0.00, 1.00, 0.00 > }
    finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 }
  }
    
#declare bola =
  sphere {
    < 0.00, 0.00, 0.00 >, 1.50 
    texture { tinta_A }
  }
  
#declare olho = 
  cylinder {
    < 0.00, 0.00, 3.00 >,
    < 0.00, 0.00, -3.00 >,
    0.40
    texture { tinta_B }
  }
  
#declare pilar1 = 
  cylinder {
    < 0.00, 0.00, -4.00 >,
    < 0.00, 6.00, 0.00 >,
    0.75
    texture { tx_espelho }
    
  }

#declare pilar2 = 
  cylinder {
    < 4.00, 0.00, 4.00 >,
    < 0.00, 6.00, 0.00 >,
    0.75
    texture { tx_espelho }
    
  }  
 
#declare pilar3 = 
  cylinder {
    < -4.00, 0.00, 4.00 >,
    < 0.00, 6.00, 0.00 >,
    0.75
    texture { tx_espelho }
    
  }
  
  
#declare boca =
  box 
  {
    <-0.30, -0.60, 3.00>,
    <+0.30, -0.80, -3.00>
    texture { tinta_B }
  }

#declare topo =
 torus {
      1.50, 0.75
      texture { tx_espelho2 }
    }
  
 
#declare base =
cone
{
  <+0.00, 0.00, 0.00>,
  1.50,
  <0.00, 3.00, 0.00>
  0.75
  texture { tx_cristal }
  interior { ior 1.2}
}






// Aqui está a cena, finalmente:


#declare cabeca =
difference { 
 union {
   object { bola } 
   //object { orelha }
 }
  object { olho  translate <-0.50,0.30, 0.00 >}
  object { olho  translate <0.50,0.30, 0.00 >}
  object { boca }
}


#declare braco =
union{
 intersection {
   //object {ombro}
   //object {meio_braco}
 }
 //object {mao}
 }
 
 
//object {braco translate <2.00, 0.00, 0.00>
//rotate 10*x}
//object {braco translate <-2.00, 0.00, 0.00>
//rotate -10*x}

 
//object {cabeca}
//object {perna translate <-0.80,0.00,0.00>}
//object {pe translate <-0.80,0.00,0.00>}

//object {perna translate <0.80,0.00,0.00>}
//object {pe translate <0.80,0.00,0.00>}

object { base 
	translate <0,0, -4.00>
	}
object { base 
	translate <4.0, 0, 4.0>
	}
object { base 
	translate <-4.0, 0, 4.00>}
object { pilar1 
	translate <0.00, 2.80, 0.00>
	}
object { pilar2 
	translate <0.00, 2.80, 0.00>
	}
object { pilar3 
	translate <0.00, 2.80, 0.00>
	}
	
	
object { topo
	rotate <90, 0,0> 
	translate <0.00, 10.00, 0.00> 
	}

object { plane {y,0}
           translate <0,0,-2>
           pigment { checker color Blue, color Yellow } }