// Last edited on 2004-03-13 15:53:07 by stolfi // Lab. 6 - Romeu Ribeiro M. da Fonseca RA: 993236 // ====================================================================== #declare ctr = < 0.00, 0.00, 10.00 >; #declare camDir = 0.8 * < 0, 50.00, -10.00 >; camera { location ctr + 1.00*camDir right -1.00*x up 0.75*y sky z look_at ctr } // ====================================================================== // 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 // Aqui estao os parametros da animacao, propriamente dita #if ((clock > 0.2) & (clock <= 0.4)) object { pacote_esferico } object { pacote_cubico translate < +5, 0, 0> } object { pacote_conico } #end #if ((clock > 0.4) & (clock <= 0.6)) object { pacote_esferico translate < 0, 0, +10> } object { pacote_cubico translate < 0, 0, +5> } object { pacote_conico translate < -5, 0 ,+5>} #end #if ((clock > 0.6) & (clock <= 0.8)) object { pacote_esferico translate < -5, 0, +15> } object { pacote_cubico translate < +5, 0, +10> } object { pacote_conico translate < -10, 0 , 0>} #end #if ((clock > 0.8) & (clock <= 1.0)) object { pacote_esferico translate < -15, 0, +15> } object { pacote_cubico translate < +10, 0, +5> } object { pacote_conico translate < -5, 0 , -5>} #end }