// Last edited on 2003-10-22 01:53:53 by stolfi

global_settings { max_trace_level 25 }

#declare ctr = < 24, 25, 10 >;
#declare camdir = < -22.00, -17.00, 22.00 >;

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

// ======================================================================
// FONTES DE LUZ

light_source {
  100 * < +120.0, 250.0, +450.0 >              // Posição da lâmpada.
  color rgb 1.0 * < 1.00, 1.00, 1.00 >   // Intensidade e corda luz.
} 

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

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

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

#include "colors.inc"

#declare cor_1 = 
  texture {
    pigment { color rgb < 0.10, 0.80, 1.00 > }
    finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 }
  }

#declare cor_2 = 
  texture {
    pigment { color rgb < 1.00, 0.80, 0.10 > }
    finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 }
  }
  
#declare cor_cristal = < 1.00, 0.80, 0.10 >;
#declare tx_cristal = 
    texture {
        finish {
            ambient 0.1 diffuse 0.1
            reflection 0.25
            specular 1 roughness 0.001
        }
        pigment { color cor_cristal filter 1 }
    }

#declare cor_espelho = < 0.70 0.80 0.85 >;
#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 pilastra = 
  cylinder {
    < 6, 6, 0 >,
    < 6, 6, 20 >,
    2
    texture { 
        tx_espelho 
    }
  }

#declare chao = 
   plane { 
       z, 0 
       pigment { checker 0.5*<0.0,0.7,1.0> + 0.5*Gray60, White scale 5 }
       finish { ambient 0.5 diffuse 0.5 }
   }
 

#declare teto = 
   torus { 15, 12        // major and minor radius

    rotate -90*x      
                                                                                                                                             
    translate 20*x
    translate 25*y
    translate 60*z
 
   scale < 1.8, 1, 0.3 >

   texture { tx_cristal }

   interior { ior 1.5 }   
 
  }

  
union {
     object { teto }
     object { chao }
     object { pilastra }
     object { pilastra translate < 19, 0, 0 > }
     object { pilastra translate < 38, 0, 0 > }
     object { pilastra translate < 0, 18, 0 > }
     object { pilastra translate < 19, 18, 0 > }
     object { pilastra translate < 38, 18, 0 > }
}