// MC930 A, S2 2003 // Last edited on 2003-10-14 23:47:26 by stolfi // Autor: Leonel Aguilar Gayard // RA 009103 // Data 14/08/2003 // Tema: Forrobotica #include "colors.inc" // ====================================================================== // CÂMERA #declare ctr = < 0, 0, -3.2>; #declare camdir = < 5 , -15 , 5 >; camera { location ctr + 0.75*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 * < +10.0, -30.0, +30.0 > // Posição da lâmpada. color rgb 1.2 * < 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.8 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source { <0,0,-9> color rgb 1.0 * <1,1,1> } light_source { <0, -10, 6> color rgb 10 * <1,1,1> rotate 270 * z } // ====================================================================== // DESCRIÇÃO DA CENA background{ color rgb < 0.75, 0.80, 0.85 > } #declare raio = 2.000; #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 < 0.10, 0.80, 1.00 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_AZUL = texture { pigment { color rgb < 0.00, 0.0, 1.00 > } } #declare tinta_VERDE = texture { pigment { color rgb < 0.00, 1.0, 0.00 > } } #declare tinta_VERMELHA = texture { pigment { color rgb < 1.00, 0.0, 0.00 > } } #declare tinta_AMARELA = texture { pigment { color rgb <1, 1, 0> } } // --------------------------------------------------------------------------------- // AQUI TERMINA O ARQUIVO DO PROFESSOR E COMECA O MEU EXERCICIO /* #declare costas_poltrona = box { <0.7, 1.5, 1.5>, <1.2, 4, 3.5> texture { tinta_VERMELHA } } #declare assento = box { <0.7, 1.5, 1.5>, <4, 4, 2> texture { tinta_VERMELHA } } #declare braco_esquerdo = cylinder { <1.5, 1.0, 2>, <4, 1.0, 2>, 0.5 texture { tinta_VERDE } } #declare braco_direito = cylinder { <1.5, 4.5, 2>, <4, 4.5, 2>, 0.5 texture { tinta_VERDE } } #declare base = cone { <3, 2.8, 1.5>, 0.3 <3, 2.8, 0.4>, 1.3 texture { tinta_AZUL } } union { object { costas_poltrona } object { assento } object { braco_esquerdo } object { braco_direito } object { base } } */ #declare olho = cylinder { <-0.2, 0, 0.2>, <-0.2, -1.2, 0.2>, 0.2 texture { tinta_AZUL } } #declare cabeca = union { sphere { <0,0,0>, 1 texture { tinta_VERMELHA } } cylinder { // "orelhas" <-1.5,0,0>, <1.5,0,0>, 0.3 texture { tinta_AMARELA } } object { olho } object { olho translate <0.6, 0, 0> } } /* #declare sorriso = intersection { box { <0, 0, 0>, <0.8, 0.5, 2> texture { tinta_VERDE } } difference { sphere { <0.4, 0.225, 1>, 0.4 texture { tinta_AMARELA } } sphere { <0.4, 0.225, 1>, 0.2 } } } */ // os buracos que desenham as "curvas" #declare buraco = cylinder { <-0.5, -1, 1.5> <-0.5, 4, 1.5> 1.5 } #declare corpo = difference { box { <0, 0, 0>, <3, 3, 3> } object { buraco } object { buraco translate <4,0,0> } } #declare pedaco_perna = sphere { <0,0,0> 0.5 scale <1,1,2> } #declare perna = union { object { pedaco_perna texture {tinta_VERDE} translate <-0.75, 0, -5.5> } object { pedaco_perna texture {tinta_VERDE} translate <-0.75, 0, -7.0> } box { <0,0,0>, <1,1,0.2> texture { tinta_AZUL } translate <-0.75,-0.5,-8> } } #declare braco = union { cylinder { <0,0,0>, <2.5, 0,0>, 0.3 texture { tinta_AZUL } } sphere { <0,0,0>, 0.3 texture { tinta_VERMELHA } } cylinder { <0,0,0>, <0,0,-1.5>, 0.3 texture { tinta_AZUL } } } union { object { cabeca } // object { sorriso translate <2,2,2> texture { tinta_VERDE } } cylinder { <0,0,0>, <0,0,-2>, 0.4 texture { tinta_AZUL } } // pescoco object { corpo texture {tinta_VERDE} translate <-1.5, -1.5, -4.5> } } object { perna } object { perna translate <1.5,0,0> } object { braco translate <-2,0,-2> } object { braco rotate 180 * y translate <2,0,-2> }