// TP03 - 04/09/03 #include "colors.inc" #declare ctr = <10,6,12>; #declare cam = <10,10,30>; // ====================================================================== // CÂMERA camera { location < 10, 10.00, 30.00 > right < +0.60, 0.00, 0.00 > up < 0.00, 0.00, 0.80 > sky < 0.00, 1.00, 0.00 > look_at < 0.00, 5.00, 0.00 > } // ====================================================================== // FONTES DE LUZ light_source { 10 * < +50.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 { 10 * < +50.0, -10.0, +10.0 > // Posição da lâmpada. color rgb 0.8 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source {100*(ctr + vrotate(cam,<0,-90,0>) + 220*y) color 0.6*White} light_source {100*(ctr + vrotate(cam,<0,15,0>) + 10*y) color 0.9*White} // ====================================================================== // TRANSPARENCIA #declare cor_cristal_vermelho = rgb < 1.00, 0.30, 0.30 >; #declare tx_cristal_vermelho = texture { finish { ambient 0.1 diffuse 0.1 reflection 0.25 specular 1 roughness 0.001 } pigment { color cor_cristal_vermelho filter 1} } // ====================================================================== // METALICO #declare cor_espelho_cinza = < 0.7, 0.7, 0.7 >; #declare tx_espelho_cinza = texture { pigment { rgb cor_espelho_cinza } finish { ambient 0.05 diffuse 0.05 reflection cor_espelho_cinza specular 0.20 roughness 0.05 } } // ====================================================================== // DESCRIÇÃO DA CENA background{ color rgb < 0.75, 0.80, 0.85 > } //piso plane { y, 0 color pigment {checker color 0.7*White + 0.3*Green, color 0.4*White + 0.5*Green} } plane { x, -30 color pigment {checker color 0.7*White + 0.3*Green, color 0.4*White + 0.5*Green} } #declare tinta_amarela = texture { pigment { color Yellow } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare coluna = cylinder { < 0.00, 0.00, 0.00 >, < 0.00, 6.00, 0.00 >, 0.4 texture { tx_cristal_vermelho } interior { ior 1.5 } } #declare parede = box { < -3.00, 0.00, 0.0 >, < 3.00, 6.00, -6.00> texture { tx_espelho_cinza } } #declare base = union{ object {parede} object {coluna translate <-3,0,0>} object {coluna translate <3,0,0>} object {coluna translate <-3,0,-6>} object {coluna translate <3,0,-6>} } #declare teto = difference { torus { 3.0, 2.0 translate <0,5.5,-3> } box { < -5.00, 0.00, 2.0 >, < 5.00, 6.00, -8.00> } texture { tx_espelho_cinza } } #declare esfera = sphere { <0,6.5,-3>,2.0 texture { tx_cristal_vermelho } } #declare esferinha = sphere { <0,0,0>,1.0 texture { tx_cristal_vermelho } } #declare detalhe_porta = cylinder { < 0.00, 0.00, 0.00 >, < 0.00, 0.50, 0.00 >, 0.5 rotate -90*x } #declare porta = union { object {detalhe_porta translate<0,3.8,0.2>} object {detalhe_porta translate<-0.7,3.5,0.2>} object {detalhe_porta translate<0.7,3.5,0.2>} box { < -1.20, 0.00, 0.20 >, < 1.20, 3.50, 0.00> } texture { tx_cristal_vermelho } interior { ior 1.5 } } // Aqui está a cena: union { object{base} object{teto} object{esfera} object{esferinha translate<-2.5,7,-0.5>} object{esferinha translate<2.5,7,-0.5>} object{esferinha translate<-2.5,7,-5.5>} object{esferinha translate<2.5,7,-5.5>} object{porta} }