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

#include "colors.inc"
#include "stones.inc"


// MONUMENTO

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

// ONIBUS

#declare onibus=
	union {
	box 	{ <0,0,0.5>, <-1,1.5,1> pigment {color rgb <.5,.5,.5>}}
	box	{ <-0.2,1.52,0.75>, <-0.8,1.5,0.98> pigment {color rgb
<1,1,1>}} 	
	cylinder { <0,0.25,0.5>, <0.05,0.25,0.5>, 0.15 pigment {color
rgb <1,1,1>}}
	cylinder { <0,1.25,0.5>, <0.05,1.25,0.5>, 0.15 pigment {color rgb
<1,1,1>}}
	cylinder { <-1,0.25,0.5>, <-1.05,0.25,0.5>, 0.15 pigment {color rgb
<1,1,1>}}
	cylinder { <-1,0.25,0.5>, <-1.05,0.25,0.5>, 0.15 pigment {color rgb
<1,1,1>}}

}  	

// TELHADO

#declare telhado=
	box	{ <1,2,2.2>, <-4,-4,2.5> pigment {color rgb <.5 .6 .5>}}

//COLUNA

#declare coluna=
	box 	{ <0,1.5,0>, <0.15,1.65,2.2> pigment {color rgb <.7 .7 .7>}}

//BASE DAS COLUNAS

#declare base_coluna=
	box 	{ <0.8,2,0>, <-0.5,-4,.1> pigment {color rgb <.1 .1 .1>}}

// CERCA

#declare cerca=
 cylinder {
    <0, 0, 0>,     // Center of one end
    <0, 0, 1>,     // Center of other end
    6            // Radius
    open           // Remove end caps
      pigment{ checker
        color rgb < 1.0, 1.0, 1.0 >,
        color rgb < 0, 0, 0 >
	scale <0.1,0.1,0.1>
      }

  }

// PESSOA

#declare pessoa=
	union {
	cone {
	<1,0,0.5>, 0
	<1,0,1>,   0.2
	pigment {color rgb <0.5 0.8 0>}}

	sphere { <1,0,1.1>, 0.1 pigment {color rgb <0.9 0.9 0>}}

	}

// PAVIMENTO

#declare pavimento = 
  plane{ z, -1
    texture{ 
      pigment{ brick 
        color rgb < 0.80, 0.90, 1.00 >,
        color rgb < 0.2, 0.2, 0.6 >
      }
      finish{ diffuse 0.9 ambient 0.05 specular 0.3 roughness 0.1 }
    }
  }

// CEU

plane { z, 500
    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 <5, 45, 0>
    }
  }

// FUNDO

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

// EIXOS

#declare eixos_cartesianos = 
  union {
    cylinder { <0,0,0>, <1,0,0>, 0.02 pigment { color rgb <1,0,0> } }
    cylinder { <0,0,0>, <0,1,0>, 0.02 pigment { color rgb <0,1,0> } }
    cylinder { <0,0,0>, <0,0,1>, 0.02 pigment { color rgb <0,0,1> } }
  }

object { pavimento }
object {onibus
	translate <2,-1,-.4>
	scale <0.8,0.8,0.8>}
object {onibus
	translate <0,2.5,-.4>
	scale <0.8,0.8,0.8>}
//object {pessoa}
object {telhado}
object {base_coluna}
object {base_coluna
	translate <-2,0,0>}
object {coluna}
object {coluna
	translate <0,-1,0>}
object {coluna
	translate <0,-2,0>}
object {coluna
	translate <0,-3,0>}
object {coluna
	translate <0,-4,0>}
object {coluna
	translate <-2,0,0>}
object {coluna
	translate <-2,-1,0>}
object {coluna
	translate <-2,-2,0>}
object {coluna
	translate <-2,-3,0>}
object {coluna
	translate <-2,-4,0>}
object {cerca}

// CÂMARA

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

#declare dist_da_camera = 9.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
  rotate    <0,0,15>
}

// ILUMINAÇÃO 

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

light_source {
  20 * raio_da_cena * direcao_da_luz
  color rgb intens_da_luz * < 1, 1, 1 >
} 

light_source {
	<-1,-1,0>
  color rgb < 1, 1, 1 >
}