// Daniel Kalil Franulovic ra 001525

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


#include "colors.inc"
#include "stoneold.inc"
#include "skies.inc"

global_settings { assumed_gamma 1.5 }

camera {
  location  <  20.00, -60.00, 25.00 >  // Posição do observador.
  right     <-0.60,0.00,0.00>
 // right     -1.0*x                 // Largura RELATIVA da imagem.
 // up        0.75*y                 // Altura RELATIVA da imagem.      
  up        <0.00,0.00,0.80>
  sky       <0.00,0.00,1.00>          // Qual direção é "para cima"?
  look_at   <  0.00, 0.00, 15.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.0, +10.0, +70.0 >              // Posição da lâmpada.
  color rgb 2 * < 1.00, 1.00, 1.00 >   // Intensidade e corda luz.
} 

light_source {
  < +10.0, 40.0, +100.0 >             // Posição da lâmpada.
  color rgb 1 * < 1.00, 1.00, 1.00 >   // Intensidade e corda luz.
} 

light_source {
  < +200.0, 15.0, +100.0 >             // Posição da lâmpada.
  color rgb 3 * < 1.00, 1.00, 1.00 >   // Intensidade e corda luz.
} 

light_source {
  < -300.0, 15.0, +50.0 >             // Posição da lâmpada.
  color rgb 3 * < 1.00, 1.00, 1.00 >   // Intensidade e corda luz.
} 


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

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

 
#declare tinta_marrom = 
  texture {
    pigment { color rgb < 0.3, 0.2, 0.05 > }
    finish { diffuse 0.5 specular 0.5 roughness 0.05 ambient 0.1 }
  }

#declare dourado = 

 	texture{
	 pigment { BrightGold }
	     finish {
	        ambient .1
	        diffuse .1
	        specular 1
	        roughness .001
	        metallic
	        reflection {
	          .75
	          metallic
	        }
	     }
	}

#declare cor_prata = <0.9,0.9,0.9>;

#declare prateado = 
  texture {
    pigment {rgb cor_prata}
    finish {
        ambient .1
        diffuse .1
        specular 1
        roughness .001
        metallic
        reflection {
          .75
          metallic
        }
	}
}

#declare cor_cristal = <0.8,0.8,0.85>;

#declare tx_cristal = 
  texture {
    finish {
	ambient 0.1 diffuse 0.01
	reflection 0.25
	specular 0.9 roughness 0.001
	}
	pigment {color cor_cristal filter 0.8}
}


#declare base = 

  prism {
    linear_sweep
    linear_spline
    -5, // sweep the following shape from here ...
    5, // ... up through here
    5, // the number of points making up the shape ...
    <0,0>, <24,0>, <22,3>, <2,3>, <0, 0>
    texture { prateado }
    translate < -12,1,0>
  }

#declare bola =
	sphere {
   		<0,0,0>, 10
		texture {tx_cristal}	   	
   		interior { ior 1.08 } //para dar um pequeno "efeito" nas letras
	    	translate < 0,1,12>
}

#declare ele = 
	union {
		box {
		<0,0,0>,
		<2,2,8>
		texture{dourado}
		}
		box {
		<0,0,0>,
		<6,2,2>
		texture{dourado}
		}
	}

#declare i = 
	union {
		box {
		<7,0,0>,
		<9,2,5>
		texture{dourado}
		}
		sphere {
   		<8,1,6.5>, 0.8
		texture {dourado}	   	
		}
	}

#declare ve = 
  prism {
    linear_sweep
    linear_spline
    0, // sweep the following shape from here ...
    2, // ... up through here
    8, // the number of points making up the shape ...
    <10,8>, <12,8>, <13,2>, <14,8>, <16, 8>, <14,0>, <12,0>, <10,8>
    texture {dourado}
  }


	
#declare chao = 
	plane { z,0
	texture {tinta_marrom}
}


#declare letras = 
	union {
	object {ele}
	object {i}
	object {ve}
    	translate < -8,-1,8>
	}


sky_sphere{ S_Cloud1} //pq tah de lado???


// Aqui está a cena, finalmente:


bola


chao
base
letras