// Laboratório 03 - MC930 - Computação Gráfica //**** Palácio de Cristal **** // Marilda Pereira Yamashiro 981756 // 04/09/2003 // Last edited on 2003-10-22 00:32:56 by stolfi // ====================================================================== // CÂMERA global_settings { max_trace_level 10 } #declare ctr = < 0.00, 5.00, 30.00 >; #declare camdir = < 50.00, 50.00, 20.00 >; camera { location ctr + 4.00*camdir // Posição do observador. right -1.00*x up 0.75*y sky z // Qual direção é "para cima"? look_at ctr // 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 * < +50.0, +40.0, +70.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. } // ====================================================================== // DESCRIÇÃO DA CENA background{ color rgb < 0.75, 0.80, 0.85 > } # declare cor_cristal = <0.6,0.7,1>; # 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.8,0.8,1>; # 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 tinta_A = texture { pigment { color rgb < 0.10, 0.80, 1.00 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_B = texture { pigment { color rgb < 1.00, 0.80, 0.10 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare vermelho = texture { pigment {color rgb <1.0, 0.0, 0.0> } } #declare azul_escuro = texture { pigment {color rgb <0.6, 0.9, 1.0> } } #declare piramide_redonda = cone { < 0.00, 0.00, 100.00 >,0.00 < 0.00, 0.00, 0.00 >,30.00 texture { tx_cristal } interior { ior 1.5 } } #declare base_pir = torus { 30.00, 8.00 rotate -90*x texture {tx_espelho} } #declare chao = box { <-100.00, -100.00, 0.00>, <100.00, 100.00, 0.00> pigment {color rgb <1.0, 1.0, 1.0> } } #declare torre = cylinder { < -80.00, -20.00, 0.00 >, < -80.00, -20.00, +120.00 >, 4.00 texture { vermelho } } #declare bola = sphere { < 0.00, 0.00, 0.00 >, 2.00 texture { tinta_A } } #declare furo = cylinder { < -1.00, -2.00, -2.00 >, < +1.00, +2.00, +2.00 >, 1.50 texture { tinta_B } } #declare pino = cylinder { < -2.00, +2.00, -1.00 >, < +2.00, -2.00, +1.00 >, 0.75 texture { tinta_B } } // Aqui está a cena, finalmente: difference { union { // difference { object { piramide_redonda } object { base_pir translate <0.0, 0.0, 8.00> } // } object {chao} object { torre } object { torre translate <130.00, 40.00, 0.00> } } }