// MC930 - Computação Gráfica - 2003-S2 - Jorge Stolfi // Trabalho de Laboratório 06 - Rede de Computadores // Marilda Pereira Yamashiro 981756 06/10/2003 // ====================================================================== // CÂMERA camera { location 30*< 5.0, 20, 5 > // 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 < 0.00, -40.00, 0.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 * < +50.0, +30.0, +50.0 > // Posição da lâmpada. color rgb 1.2 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source { 10 * < +50.0, 80.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 #include "colors.inc" background{ color rgb < 0.85, 0.9, 1.0 > } #declare pack1 = sphere { < 0.00, 0.00, 9.0 >, 2.00 pigment { Blue } } #declare pack2 = cylinder { < -0.25, 0.00, 6.50 >, < -0.25, -2.50, 4.50 >, 0.50 pigment { Yellow } } #declare pack4 = cone { < 0.00, 0.00, 9.00 >,0.50 < 0.00, 0.00, 0.00 >,2.15 pigment { Yellow } } #declare pack6 = torus { 2.5, 1.5 rotate -90*z translate <-5, -95,-3> pigment { Red } } union{ #declare source = seed(10); #declare source2 = seed(345); #declare i = 1; #declare j = 1; #while (j <=5 ) #while (i <= 5) #if (rand(source) < 0.50) sphere { ,5 pigment { color rgb < rand(source), rand(source), rand(source) > } translate } #else sphere { ,5 pigment { color rgb < rand(source2), rand(source2), rand(source2) > } translate } #end #declare i=i+1; #end #if (rand(source) < 0.50) sphere { ,5 pigment { color rgb < rand(source), rand(source), rand(source) > } translate <1,j*30,1> } #else sphere { ,5 pigment { color rgb < rand(source2), rand(source2), rand(source2) > } translate <1,j*30,1> } #end #declare j=j+1; #end }