// Last edited on 2004-01-23 01:46:34 by stolfi // Rede de Pacotes - por Gilberto Sgarbi Filho - RA 001754 // ====================================================================== #declare ctr = <5, 7, 2>; #declare camDir = < 25, 15, 20 >; camera { location ctr + 0.55*camDir right -1.00*x up 0.75*y sky y look_at ctr } // ====================================================================== // 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 cor da luz. } light_source { 10 * < +50.0, -10.0, +10.0 > // Posição da lâmpada. color rgb 0.5 * < 1.00, 1.00, 1.00 > // Intensidade e cor da luz. } // ====================================================================== // DESCRIÇÃO DA CENA background{ color rgb < 0.75, 0.80, 0.85 > } #declare gerador1=seed(057829); #declare gerador2=seed(498137); #declare gerador3=seed(777777); #declare pacotes = union{ #declare i=1; #while(i<=10) #declare pA = <0, 3,0>; #declare pB = <1, -2, 0>; #declare tempo = (clock - 0.3) / (0.3 - 1.0); #if (mod(i,2)=1) // Desenha Caixas na parte de cima #declare pos = (1-tempo)*pB + tempo*pA; #if (mod(i,4)=1) // Algumas caixas se movem, descendo box{<5, 12, 10 - 1.5*i >, <3, 11, 9 - 1.5*i> pigment {color rgb } translate pos } #else // Outros não box{<5, 12, 10 - 1.5*i >, <3, 11, 9 - 1.5*i> pigment {color rgb } } #end #else // Desenha Esferas na parte de baixo #declare pos = (1-tempo)*pA + tempo*pB; #if (mod(i,4)=0) // Algumas esferas se movem, subindo sphere{<0, 0, 11.5 - 2*i>, 0.5 + 0.05*i pigment {color rgb } translate pos } #else // Outras não sphere{<0, 0, 11.5 - 2*i>, 0.5 + 0.05*i pigment {color rgb } } #end #end #declare i=i+1; #end } #declare grade = union{ #declare j=1; #while(j<=5) #declare i=2; #while(i<=2) cylinder{<5, 11.5, 11-3*j>, <5, 2.5, 11-3.2*j>, 0.05 // Linhas verticais pigment {color rgb <0,0,0>} } // object { pacotes translate pos } #declare i=i+1; #end #if (j<5) cylinder{<5, 11.5, 11-3*j>, <5, 11.5, 8-3*j>, 0.05 // Linhas horizontais pigment {color rgb <0,0,0>} } cylinder{<5, 2.5, 11-3.2*j>, <5, 2.5, 8-3.2*j>, 0.05 // Linhas horizontais pigment {color rgb <0,0,0>} } #end #declare j=j+1; #end } // Cena: union { object { pacotes } object { grade } }