// Last edited on 2003-10-22 04:17:38 by stolfi

global_settings { max_trace_level 10 }

#declare ctr = <0,4,0>;
#declare camdir = <5,7,25>;

camera{
  location  ctr + 0.75*camdir
  right     -1.00*x
  up        0.75*y
  sky       y
  look_at   ctr
}

light_source {
  100* < 0.0, +50.0, 30.0 >              // Posição da lâmpada.
  color rgb 1.2 * < 1.00, 1.00, 1.00 >   // Intensidade e corda luz.
}

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

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


#declare tinta_D = 
  texture {
    pigment { color rgb < 0.90, 0.0, 0.20 > }
    finish { diffuse 0.5 specular 0.2 roughness 0.9 ambient 0.001 }
  }
  
#declare cor_espelho= color rgb <0,0,0.5>;  
#declare espelho= 
texture{
pigment {rgb cor_espelho}
finish{
ambient 0.05 diffuse 0.05
reflection cor_espelho
specular 0.50 roughness 0.001 
}
} 

#declare cor_metal= color rgb <0.7,0.7,0.1>;  
#declare metal= 
texture{
pigment {rgb cor_metal}
finish{
ambient 0.05 diffuse 0.05
reflection cor_metal
specular 0.50 roughness 0.001 
}
}  
 

#declare cor_vidro = color rgb <0.9,0.9,0.9>;
#declare vidro = 
texture{
 finish{
  ambient 0.1 diffuse 0.1
  reflection 0.25
  specular 1 roughness 0.001
  }
 pigment { cor_vidro filter 1}
 
 }
 
#declare cor_vidro_escuro = color rgb <0.5,0.0,0.01>;
#declare vidro_escuro = 
texture{
 finish{
  ambient 0.1 diffuse 0.4
  reflection 0.25
  specular 0.5 roughness 0.01
  }
 pigment { cor_vidro_escuro filter 0.5}
 
 }
 
 
#declare esfera=
 sphere{
  <0.00, 5.00, 0.00>,2.0
    texture {espelho}
 }

#declare caixa_hall=
 box{
  <-3,0,-5>,
  <3,5,5>
  texture{vidro_escuro}
 }

 #declare pino_torre=
 cylinder{
 <0,0,0>,
 <0,10,0>,
 1.5
 texture{metal}
 }
 
 #declare pino_porta1=
 cylinder{
 <0,2.5,10>,
 <0,2.5,-10>,
 1.0
 texture{tinta_D} 
 }
 #declare box_porta=
 box{
 <-1,-1,10>
 <1,2.5,-10>
 texture{tinta_D}
 }
 
 #declare pino_porta=
 union{
 object{pino_porta1}
 object{box_porta}
 }
 
 #declare anel=
 torus{
 1.5,0.3
 texture{vidro}
  }
  
 #declare anel1=
 object{anel
 translate<0,8,0>
 }
 
  #declare anel2=
 object{anel
 translate<0,6,0>
 }
 
#declare torre = 
union{
object{pino_torre}
object{anel1}
object{anel2}
}

#declare torre1=
object{torre
translate<4.5,0,3.5>
}


#declare torre2=
object{torre
translate<-4.5,0,3.5>
}

#declare hall =
difference{
object{caixa_hall}
object{pino_porta}
}


sky_sphere{pigment{ color rgb <0.75,0.76,0.82>}}

plane{y,0 // !! era -20
  texture{
    pigment{ checker color Gray50, color White scale 4
    }
  }
}

object{esfera}
object{hall}
object{torre1}
object{torre2}