// Last edited on 2003-10-23 01:00:18 by stolfi
#include "colors.inc"
#include "textures.inc"

// Exemplo de arquivo de descricao de cena para POV-ray

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

#declare ctr = <  0.00, 0.00, 3 >;
#declare camdir = <  0.00, 10.00, 20.00 >;

camera {
  location ctr + 1.00*camdir
  right    -1.00*x
  up       0.75*y
  sky      y                      // Qual direção é "para cima"?
  look_at  ctr
} 
// 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 {
  5 * < 20.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 {
  5 * < -20.0, 30.0, +50.0 >             // Posição da lâmpada.
  color rgb 0.6 * < 1.00, 1.00, 1.00 >   // Intensidade e corda luz.
} 

// ======================================================================
// DESCRIÇÃO DA CENA 

background{ color rgb < 0.75, 0.80, 0.85 > }

#declare raio = 2.000;
#declare cor_cristal = <0.8,0.8,0.8>;

#declare tx_cristal1 = 
  texture {
    finish {
    ambient 0.1 diffuse 0.1
    reflection 0.25
    specular 1 roughness 0.001
	}
    pigment {color  cor_cristal filter 1}		
  }


#declare tx_cristal2 = 
  texture {
    finish {
    ambient 0.1 diffuse 0.1
    reflection 0.25
    specular 1 roughness 0.001
	}
    pigment {color <0.65,0.85,0.65> filter 1}		
  }


#declare tx_cristal3 = 
  texture {
    finish {
    ambient 0.1 diffuse 0.1
    reflection 0.25
    specular 1 roughness 0.001
	}
    pigment {color <0.95,0.75,0.75> filter 1}		
  }


#declare cor_espelho = Silver ;
#declare tx_espelho = 
texture{
	pigment{ rgb cor_espelho }
	finish{
	ambient 0.05 diffuse 0.05
	reflection cor_espelho
	specular 0.20 roughness 0.05	
	}
}

#declare tx_prata =
texture {

pigment { Gray50 }

     finish {

        ambient .2

        diffuse .5

        specular .75

        roughness .009

        reflection .6
}}

#declare tx_ouro = 
	
      texture {
 	pigment {BrightGold }

     finish {

        ambient .05

        diffuse .2

        specular 0.5

        roughness .02

        reflection .7


}}

#declare toros =
torus {	1,0.3
     rotate 90*x
} 
#declare base =

cylinder{ <0,0,0>,<0,0,1.7>,2
 texture {tx_cristal1}
	interior { ior 1.5 }
}

#declare chao =
plane {y,0
pigment { checker color White, color Black , scale 2 }
}

#declare toros1 =
object { 
 toros  
texture {tx_ouro}
scale 2
translate 2*z
 

}

#declare toros2 =
object { 
 toros  
texture{ tx_prata }
scale 1.5
translate 2.9*z
 }

#declare toros3 =
object { 
 toros  
texture{ tx_cristal2 }
scale 1.1
translate 3.6*z
 }


#declare bola =
  sphere {
    < 0.00, 0.00, 0.00 >, 1.00 
    texture { tx_cristal3 }
  }
  
#declare topo =
object {
bola 
scale 0.8
translate 4*z
}

#declare fomezero =
text {
ttf "latinwd.ttf"
"FOME ZERO"
0.5, 0
pigment { color <0.3,0.7,1.0> }
translate -5*x
rotate 720*clock*y
translate (9-5*clock)*y 
}

#declare caixa =
box {<0,0,0>,<1,1,1>

} 

#declare primeiro = 
object { caixa
	
	translate -0.5*x
        translate -0.5*z
	scale 1+1*clock
	scale <1,2,1>	
	pigment{color Red }
}


#declare segundo = 
object { caixa
	translate (-7+5.5*clock)*x
        translate -0.5*z
        scale <2,3,2>	
	pigment{color Green }
}


#declare terceiro = 
object { caixa
	translate (5.5-5*clock)*x
        translate -0.5*z
        scale <2,2,2>	

	pigment{color <0.3,0.7,1.0>  }
}


#declare formula1 =
text {
ttf "arial.ttf"
"FORMULA 1"
0.5, 0
pigment { color Yellow }
translate 3*z
translate (-15.3+13*clock)*x
}  



#declare tudohaver =
text {
ttf "impact.ttf"
"TUDO A VER !!!"
0.5, 0
pigment { color Green}
translate -3*x
translate (14-8*clock)*z
}  




// Aqui está a cena, finalmente:

//difference { 
  //union {
    //object { bola } 
    //object { pino }
 // }
  //object { furo }
//}

//object { toros}
object { chao }
//object { base }
//object {toros1}
//object {toros2}
//object {toros3}
//object {topo}
object{fomezero}
object{primeiro}
object{segundo}
object{terceiro}
object{formula1}
object{tudohaver}