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

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

camera { 
  location  <  15.00, 4.00, 1.00 >  // Posição do observador.
  right     -1.0*x                 // Largura RELATIVA da imagem.
  up        0.75*y                 // Altura RELATIVA da imagem.      
  sky       z                      // Qual direção é "para cima"?
  look_at   <  0.00, 0.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 


sky_sphere {

    pigment {

      gradient y

      color_map {

        [0.000 0.002 color rgb <1.0, 0.2, 0.0>

                     color rgb <1.0, 0.2, 0.0>]

        [0.002 0.200 color rgb <0.8, 0.1, 0.0>

                     color rgb <0.2, 0.2, 0.3>]

      }

      scale 2

      translate -1

    }

    pigment {

      bozo

      turbulence 0.65

      octaves 6

      omega 0.7

      lambda 2

      color_map {

          [0.0 0.1 color rgb <0.85, 0.85, 0.85>

                   color rgb <0.75, 0.75, 0.75>]

          [0.1 0.5 color rgb <0.75, 0.75, 0.75>

                   color rgbt <1, 1, 1, 1>]

          [0.5 1.0 color rgbt <1, 1, 1, 1>

                   color rgbt <1, 1, 1, 1>]

      }

      scale <0.2, 0.5, 0.2>

    }

    rotate -135*x

  }

#declare raio = 2.000;

#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 verde = < 0.20, 0.8, 0.10 >;

#declare amarelo = < 0.75, 0.65, 0.0 >;
#declare dourado =
  texture {
	pigment { rgb amarelo }
	finish {
	  ambient 0.05 diffuse 0.05
	  reflection amarelo
	  specular 0.20 roughness 0.05
	}
  }

#declare cristal_branco =
  texture {
	pigment { color rgb < 0.8, 0.8, 0.8 > filter 0.7 }
	finish {
	  ambient 0.1 diffuse 0.1
	  reflection 0.25
	  specular 1 roughness 0.001
	}
  }

#declare peao =
difference {
	sphere {
		< 0, 0, 0 > 
		2.00
	}
	torus {
	  2.5, 2.5
	  rotate -90*x
	  translate < 0, 0, 2.0 >
	}
}


#declare chapeu_russo = 
union {
	object { peao }

	torus {
	  1.70, 0.5
	  rotate -90*x
	  translate < 0, 0, -0.8 >
	}


	texture { dourado }
}

#declare coluna_torre =
cylinder {
  < 0, 0, -1.3 >
  < 0, 0, -4.0 >
  1.7

  texture { cristal_branco } 

}

// Aqui está a cena, finalmente:
plane { z, -4.0

    pigment { color rgb verde }

    finish { ambient .3 diffuse .7 }

  }

union {

	object { chapeu_russo } 
	object { coluna_torre }

}