// Last edited on DATE TIME by stolfi
// Exemplo de arquivo de descricao de cena para POV-ray

// ======================================================================
#declare zoom = 0.9;

#declare ctr = < 64, 10, 8 >;
#declare camDir = (< -20,-25, 10 >) - (< 64, 10, 8 >);

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

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

light_source {
  10 * < 50, -10.0, +10.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, 70.0 >             // Posição da lâmpada.
  color rgb 0.8 * < 1.00, 1.00, 1.00 >   // Intensidade e corda luz.
} 

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

// ======================================================================
// DESCRIÇÃO DA CENA 
#declare C = 1/255;
background{ color rgb < 0.95, 0.90, 0.68 > }


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

#declare cor_espelho = <0.1,0.1,0.2>;
#declare tx_espelho =
  texture {
    pigment { rgb cor_espelho }
    finish { ambient 0.05 
       diffuse 0.05 
       reflection 0.95
       specular 0.20 roughness 0.05 
     }
  }

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

#declare amarelo = 
  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.0, 0.0, 0.0 > }
    finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 }
  }
#declare verde = 
  texture {
    pigment { color rgb < 0.0, 1.0, 0.0 > }
    finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 }
  }
#declare laranja = 
  texture {
    pigment { color rgb < 252*C, 200*C, 81*C > }
    finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 }
  }

#declare preto = 
  texture {
    pigment { color rgb < 0*C, 0*C, 0*C > }
    finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 }
  }
#declare xadrez =
texture {
pigment {checker color rgb <1,1,0.9>
  color rgb <0,0,0.9>
}
}

// Objetos
// Os eixos para auxilio
#declare  eixo_x = 
   cylinder {
    < -50, 0, 0 >,
    < 50, 0, 0 >,
    0.1
    texture { vermelho }
  }
#declare  eixo_y = 
   cylinder {
    < -50, 0, 0 >,
    < 50, 0, 0 >,
    0.1
    texture { verde }
    rotate <0,0,90>
  }
#declare  eixo_z = 
   cylinder {
    < -50, 0, 0 >,
    < 50, 0, 0 >,
    0.1
    texture { azul }
    rotate <90,90,0>
  }

#declare eixos = 
union{
  object{eixo_x}
  object{eixo_y}
  object{eixo_z}
}

//O Chao
#declare chao =
box{
  <-200,-200,0>,
  <200,200,-1>
  texture { xadrez }
}

#include "dados.inc"
object {chao}
sky_sphere {
    pigment {
      gradient z
      color_map {
        [(1-cos(radians( 30)))/2 color <247*C,200*C,255*C>]
        [(1-cos(radians(120)))/2 color <255*C,213*C,80*C>]
      }
      scale 10
      translate -1
    }
  }

/*-------------------------------------------------------
object {eixos}
object {
  box{
    <0,0,0>
    <5,1,h1>
    texture{ pigment {color rgb <1,1,0>}}
  }
  translate <o1,0,0>
}
---------------------------------------------------------*/