// Exemplo de arquivo de descricao de cena para POV-ray
// Last edited on 2003-07-31 23:59:46 by stolfi

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

camera {
  location  0.65*<  10.00, 10.00, 25.00 >  // Posição do observador.
  right     -1.0*x                 // Largura RELATIVA da imagem.
  up        0.75*y                 // Altura RELATIVA da imagem.      
  sky       y                      // 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, -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 < 0.75, 0.80, 0.85 > }

#declare tinta_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 tinta_azul = 
  texture {
    pigment { color rgb < 0.00, 0.00, 1.00 > }
    finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 }
  }

#declare tinta_vermelha = 
  texture {
    pigment { color rgb < 1.00, 0.00, 0.00 > }
    finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 }
  }
    
#declare assento = 
  cylinder {
    < 0.00, 0.00, 0.00 >,
    < 0.00, +5.00, 0.00 >,
    2.5
    texture { tinta_azul }
  }
  
#declare encosto = 
  torus { 1.3, 1.1       
    rotate -90*x      // so we can see it from the top
    translate y*7
    translate z*-2
    texture { tinta_verde }
  }
 
#declare braco1 = 
  box {
    <-2.5, +5.00, 2.00 >,
    <-1.50, +6.30, -2.00>
    texture { tinta_vermelha }
  }

#declare braco2 = 
  box {
    <1.50, +5.00, 2.00 >,
    <2.50, +6.30, -2.00>
    texture { tinta_vermelha }
  }

#declare cabeceira =
  box {
    <-1.60, +9.20, -1.00 >,
    <1.60, +10.50, -3.00>
    texture { tinta_vermelha }
  }
  
// Aqui está a cena:
difference { 
  union {
    object { assento } 
    object { encosto }
    object { braco1 }
    object { braco2 }
    object { cabeceira }
  }
}