// Lab. 2 - Romeu Ribeiro M. da Fonseca RA: 993236 // Last edited on 2003-10-15 00:29:40 by stolfi // ====================================================================== // CÂMERA #declare ctr = < 0.00, 0.00, 0.00 >; #declare camdir = < -15.00, -40.00, 10.00 >; camera { location ctr + 0.65*camdir // Posição do observador. right -0.60*x // Largura RELATIVA da imagem. up 0.80*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 { 10 * < -50.0, -20.0, +50.0 > // Posição da lâmpada. color rgb 1.1 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source { 10 * < +10.0, -50.0, +10.0 > // Posição da lâmpada. color rgb 0.5 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } // ====================================================================== // DESCRIÇÃO DA CENA background{ color rgb < 0.75, 0.80, 0.85 > } #declare tinta_Azul = texture { pigment { color rgb < 0, 0, 1.00 > } finish { diffuse 0.8 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_Vermelha = texture { pigment { color rgb < 1.00, 0, 0 > } finish { diffuse 0.8 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_Verde = texture { pigment { color rgb < 0, 1.00, 0 > } finish { diffuse 0.8 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_Amarela = texture { pigment { color rgb < 0, 1.00, 1.00 > } finish { diffuse 0.8 specular 0.5 roughness 0.005 ambient 0.1 } } #declare head = sphere { < 0.00, 0.00, 5.00 >, 2.00 texture { tinta_Vermelha } } #declare member = cylinder { < 0.00 , -2.00, -2.00 >, < +1.00, +2.00, +2.00 >, 1.00 texture { tinta_Verde } } #declare neck = cylinder { < 0.00, 0.00, 2.00 >, < 0.00, 0.00, 4.00 >, 0.75 texture { tinta_Verde } } #declare body = box { < -5.00, -2.00, -8.00 >, < +5.00, +2.00, +2.00 > texture {tinta_Azul} } #declare shoulder = sphere { < -5.00, 0.00, 0.75 >, 1.50 texture { tinta_Azul } } //#declare eye = //sphere { // < 0.75, 0.00, 5.25>, 0.25 // } //} //#declare heart = // Aqui está a cena, finalmente: //difference { union { object { head scale 1.50 translate < 0.00, 0.00, -1.00 > } object { neck } object { body } object { shoulder } object { shoulder rotate < 0, 0, 180 > translate < +0.75, 0.00, 0.00> } }