// Lab. 5 - Romeu Ribeiro M. da Fonseca RA: 993236 // ====================================================================== // CÂMERA camera { location 0.8 * < 0, 50.00, 0 > // Posição do observador. right < -0.60, 0.00, 0.00 > // Largura RELATIVA da imagem. up < 0.00, 0.00, 0.80 > // Altura RELATIVA da imagem. sky < 0.00, 0.00, 1.00 > // Qual direção é "para cima"? look_at < 0.00, 0.00, 10.00 > // 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, +50.0 > // Posição da lâmpada. color rgb 1.2 * < 0.90, 1.00, 0.90 > // Intensidade e corda luz. } light_source { 10 * < -10.0, -30.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 fonte_objeto = seed(13); #declare tinta_Azul = texture { pigment { color rgb < 0, 0, 1 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_Vermelha = texture { pigment { color rgb < 1, 0, 0 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_Verde = texture { pigment { color rgb < 0, 1, 0 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_Amarela = texture { pigment { color rgb < 1, 1, 0> } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_Preta = texture { pigment { color rgb < 0, 0, 0> } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_Branca = texture { pigment { color rgb < 1, 1, 1> } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare pacote_conico = cone { < 0.00, 0.00, +15>, 0.75, < 0.00, 0.00, +16>, 0 texture { tinta_Vermelha } } #declare pacote_cubico = box { < 0, 0, 0>, < +1, +1, +1 > texture { tinta_Azul } } #declare nos = sphere { < 0, 0, 0 >, 1 texture { tinta_Branca } } #declare pacote_esferico = sphere { < 10.00, 0.00, 5.00 >, 0.5 texture { tinta_Amarela } } #declare linhas = cylinder { < 0 , 0, 0 >, < 10, 0, 0 >, 0.15 texture { tinta_Verde } } // Aqui está a cena, finalmente: union { #declare i = 0; # while (i <= 2) object { nos translate < -10, 0, 10*i> } object { linhas translate <-10, 0, 10*i> } # if (i < 2) object { linhas rotate <0, 270, 0> translate <-10, 0, 10*i> } # end object { nos translate < 0, 0, 10*i> } object { linhas translate <0, 0, 10*i> } # if (i < 2) object { linhas rotate <0, 270, 0> translate <0, 0, 10*i> } # end object { nos translate < +10, 0, 10*i> } # if (i < 2) object { linhas rotate <0, 270, 0> translate <+10, 0, 10*i> } # end #declare i = i + 1; #end object { pacote_esferico } object { pacote_cubico } object { pacote_conico } }