// Arquivo básico para os laboratórios // Luciano Ludka Cordeiro // Last edited on 2003-10-22 01:08:06 by stolfi global_settings { max_trace_level 10 } // ====================================================================== // CÂMERA #declare ctr = < 0.00, 0.35, 0.30 >; #declare camdir = < 1.00, 1.50, 0.20 >; camera { location ctr + 0.80*camdir // Posição do observador. right -1.0*x // Largura RELATIVA da imagem. up 0.75*y // Altura RELATIVA da imagem. 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 { 100 * < +10.0, +50.0, +70.0 > // Posição da lâmpada. color rgb 1.2 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source { 100 * < +50.0, +10.0, +10.0 > // Posição da lâmpada. color rgb 0.6 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } // ====================================================================== // AUXILIARES background{ color rgb < 0.75, 0.80, 0.85 > } #declare raio = 2.00; #declare posicao_a = < 0.00, 0.00, 0.00 >; //************************************************************************************** //* CORES ****************************************************************************** //************************************************************************************** #declare azul_claro = texture { pigment { color rgb < 0.10, 0.80, 1.00 > } finish { diffuse 0.9 specular 0.5 roughness 0.005 ambient 0.1 } } #declare xadrez = texture { pigment { checker color rgb < 0.10, 0.60, 0.80 >, color rgb < 1.00, 1.00, 1.00 > } finish { diffuse 0.9 specular 0.5 roughness 0.005 ambient 0.1 } } #declare caqui = 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 = < 0.10, 0.80, 1.00>; #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} } // interior{ ior 1.5 } #declare cor_cristal_b = < 0.80, 0.40, 0.80>; #declare tx_cristal_b = texture{ finish{ ambient 0.1 diffuse 0.1 reflection 0.25 specular 1 roughness 0.001 } pigment{color cor_cristal_b filter 1} } #declare cor_espelho = < 0.45, 0.45, 0.45 >; #declare tx_espelho = texture{ pigment{rgb cor_espelho} finish{ ambient 0.05 diffuse 0.05 reflection cor_espelho specular 0.20 roughness 0.05 } } //************************************************************************************** //* FIGURAS E OBJETOS ****************************************************************** //************************************************************************************** #declare parede = box { < -0.25, 0.00, 0.00 >, < +0.25, 0.60, 0.20 > texture {tx_cristal } } #declare separacao = box{ < -0.025, 0.00, 0.00 >, < +0.025, 0.80, 0.10 > texture {tx_espelho} } #declare area_interna = box { < -0.20, 0.00, 0.00 >, < +0.20, 0.60, 0.15 > texture { tx_cristal } } #declare predio = union{ difference { object { parede } object { area_interna } } object{separacao} } #declare bola = sphere{ <0.00, 0.40, 0.20>, 0.15 texture { tx_cristal_b } } #declare cupula = difference{ object{ bola } // faz a cupula object{ parede } // e tira o predio } #declare torre = cone{ < -0.15, 0.10, 0.20 >,0.10, < -0.15, 0.10, 0.70 >,0.00 texture { azul_claro } } #declare torre_b = object{ torre translate <0.30, 0.00, 0.00> } #declare anel_enfeite = torus{ 0.225, 0.025 texture { tx_cristal_b } translate <0.00, 0.575, 0.20> } #declare enfeite = difference{ object{anel_enfeite} object{parede} } #declare chao = plane { <0, 0, 1>, 0.01 texture { xadrez scale 0.125 rotate 30*z } } //************************************************************************************** //* CENA ******************************************************************************* //************************************************************************************** union{ object{predio} object{cupula} object{torre} object{torre_b} object{chao} object{enfeite} } //difference { // union { // object { bola } // object { pino } // } // object { furo } //}