#include "colors.inc"
#include "textures.inc"
#include "golds.inc"
#include "skies.inc" 

camera {
    angle 45
    location <32, 15, -13> 
    look_at <0, 5, 0>
} /*
camera {
    angle 45
    location <-2, 12, -9>
    look_at <-0.01,11,-8>
} */

plane { y, 0  //this is the grout
   pigment { checker color Green, color White scale 3 }
   finish { ambient .4 diffuse .7 }
}

light_source{ <30, 12, -10> White }
light_source{ <30, 12, -10> White }
sky_sphere { S_Cloud5 }

#declare cor_cristal = White;
#declare tex_cristal = 
	
	texture {
		finish {
			ambient 0.1 diffuse 0.1
			reflection 0.25
			specular 1 roughness 0.001
			}
		pigment {color cor_cristal filter 1.0}
		
	}	
	
	
#declare cor_espelho = Grey;
#declare tex_espelho = 
	texture {
		finish {
			ambient 0.05 diffuse 0.05
			reflection cor_espelho
			specular 0.20 roughness 0.05
			}
		pigment {rgb cor_espelho}
		}	
		

#declare colar =

 torus { 3, 1        // major and minor radius

    texture { tex_espelho }
    scale <0,0.5,0>
    translate <0,10,0>
    

  }  
#declare cinturao =

 torus { 7, 3        // major and minor radius

    texture { tex_espelho }
    interior { ior 1.5 }
    translate <0,-1.5,0>

  }  
#declare central =
cone {
     <0,1,0>,
     7,
     <0,15,0>,
     0
     texture { tex_cristal }
     interior { ior 1.1 }
   } 
#declare torre_esq =
union {

 cone {
  <0,9,-7>,
     1,
     <0,11,-7>,
     0
     pigment {rgb Red}
     
 }
 cylinder { 
 <0,0,-7>,
 <0,9,-7>,
 1
texture { tex_espelho }
 }
 cylinder { //mastro
 <0,10,-7>,
 <0,11.5,-7>,
 0.1
pigment { White }
 }
 //bandeira
 box {
    <-0.01,11,-7>,
    <+0.01,11.5,-9>
    pigment { White }
 
 }
torus { 1.4, 0.9        // major and minor radius

    texture { tex_espelho }
    scale <1,0.5,1>
    translate <0,8,-7>
    

  }  
 
  torus { 1.4, 0.9        // major and minor radius

    texture { tex_espelho }
    scale <1,0.5,1>
    translate <0,6,-7>
    

  }  
}

#declare entrada =
cone {
     <3,1,0>,
     3,
     <14,1,0>,
     3
     texture { tex_espelho }
     interior { ior 1.1 }
     scale<1,1.5,1>
     translate <0,-1.5,0>
   } 

   

// Aqui está a cena, finalmente:  

union {
  
  
   object {colar}
   object {torre_esq}
   object {torre_esq
   		translate <0,0,+14>}
   difference {
   
   union {
   object {cinturao}
   object {central} 
   }
   object{entrada}
   
   }
}