// Trabalho Final de MC930 - Computaco Grafica
// Professor: Jorge Stolfi
// Tema: Teatro de Arena do Centro de Convivencia Cultural
// Aluno: Marcos Makoto Ikegame - 971219


#include "colors.inc"
#include "stones.inc"
#include "textures.inc"
#include "finish.inc"


// MC930 - Exemplo de main.pov para o trabalho final
// Last edited on 2000-12-14 09:07:40 by mc726

// MONUMENTO

#declare centro_do_monumento = < 0, 0, 0 >;

/*
#declare ceu =
  plane { z, 5
    texture {
      pigment { SkyBlue }
      finish { ambient 1 diffuse 0}
     }
     texture {
       pigment {
         bozo
         turbulence .5
         color_map {
           [0 White]
           [1 White filter 1]
         }
       }
       finish { ambient 1 diffuse 0 }
       scale <1000, 250, 250>
           rotate <75,0,-75>
    }
  }
*/

#declare palco_central_parte1 =
  cylinder {
    centro_do_monumento
    <0, 0, 0.05>,
    0.7
    pigment{ color rgb < 1.00, 0.90, 0.05 > }
    finish{ diffuse 0.05 ambient 0.05 reflection 0.90 }
  }

#declare palco_central_parte2 =
  cylinder {
    <0, 0, 0.05>,
    <0, 0, 0.1>,
    0.65
    pigment{ color rgb < 1.00, 0.90, 0.05 > }
    finish{ diffuse 0.05 ambient 0.05 reflection 0.90 }
  }

#declare palco_central_parte3 =
  cylinder {
    <0, 0, 0.1>,
    <0, 0, 0.15>,
    0.60
    pigment{ color rgb < 1.00, 0.90, 0.05 > }
    finish{ diffuse 0.05 ambient 0.05 reflection 0.90 }
  }

// TORRE DE ILUMINACAO
#declare torre_p1 =
  box {
    <0.7 + 0.075, -0.06, 0>,  
    <0.5, -0.02,  1>   
    pigment{ color rgb < 1.00, 1.0, 1.00 > }
    rotate <-20, 0, 0> 
  }
 
#declare torre_p2 =
  box {
    <0.7 + 0.075, 0.02, 0>,  
    <0.5, 0.06,  1>   
    pigment{ color rgb < 1.00, 1.0, 1.00 > }
    rotate <-20, 0, 0> 
  }

// ARQUIBANCADA
 #declare arq_1 =
  difference {
    difference {
      box {
        <0.9, -0.3, 0>,
        <1.3, 0.3, 0.4>
        pigment { color rgb <1,0.5,1> }
      }
      plane {<0,0,-1>, 0.1
        rotate <0,-45,0>
        translate <0.7, 0, 0>
        pigment { color rgb <1,0.5,1> }
      }
      pigment { color rgb <1,0.5,1> }
    }
    box {
      <0.95, -0.25, 0.05>,
      <1.05, 0.25, 0.1>
      pigment { color rgb <1,0.5,1> }
    }
    rotate <30,0,0>
  }

// PAVIMENTO
#declare pavimento =
  plane{ z, -1
//    texture {
      pigment{ 
        color rgb < 0, 0.80, 0.10 >
      }
      finish{ diffuse 0.9 ambient 0.05 specular 0.3 roughness 0.1 }
//    }
  }

// FUNDO
background{ color rgb < 0.90, 0.92, 0.95 > }

// EIXOS

#declare eixos_cartesianos = 
  union {
    // Eixo X - Vermelho
    cylinder { <0,0,0>, <1,0,0>, 0.02 pigment { color rgb <1,0,0> } }
    // Eixo Y - Verde
    cylinder { <0,0,0>, <0,1,0>, 0.02 pigment { color rgb <0,1,0> } }
    // Eixo Z - Azul
    cylinder { <0,0,0>, <0,0,1>, 0.02 pigment { color rgb <0,0,1> } }
  }

// object { ceu }
object { eixos_cartesianos }
object { pavimento }
object { palco_central_parte1 }
object { palco_central_parte2 }
object { palco_central_parte3 }
object { torre_p1 }
object { torre_p2 }
object { arq_1 }

// CÂMERA

#declare centro_da_cena = centro_do_monumento;
#declare raio_da_cena = 1.0;
#declare direcao_da_camera = vnormalize( < 1, 2, 1 > );

#declare dist_da_camera = 10.0 * raio_da_cena
#declare pos_da_camera = centro_da_cena + dist_da_camera * direcao_da_camera;
camera {
  location  pos_da_camera
  right     <  -0.64,  0.00,  0.00 >
  up        <   0.00,  0.48,  0.00 >
  sky       z
//  look_at   centro_da_cena
  look_at   < 1.4,0,0>
}

// ILUMINAÇÃO 

#declare direcao_da_luz = vrotate(direcao_da_camera, < 10, 10, 10 >);
#declare intens_da_luz = 1.25;

light_source {
  < 0, 0.2, 1.4>
//  20 * raio_da_cena * direcao_da_luz
  color rgb intens_da_luz * < 1, 1, 1 >
}