

function again(){
if(id){
for(i=0;i<100;i++){
id[i].style.backgroundColor='rgb(0,0,0)';
}
}
r=0;
a=0;
ai=Math.random()/5.0-0.1;
n=Math.floor(Math.random()*17)+3;
w=Math.floor(Math.random()*11)+1;
if(n*w>100){
n=Math.floor(n/w);
}
k=Math.random()*2.0+0.3;
if(Math.random()<0.5) k=-k;
inter=1+Math.floor(Math.random()*125);
dur = Math.floor(period/inter);
hdur2=dur*dur/4;
hdur = dur/2;
z=2*Math.PI/(n*(1+Math.random()/10));
nn=Math.floor(Math.random()*n)+1;
donut=Math.random()*10.0-5.0;
time=0;
for(i=0;i
+Math.round(+Math.random()*191)+','
+Math.round(+Math.random()*191)+','
+Math.round(+Math.random()*191)+')';
}
hey();
}
function hey(){
for(i=0;i
blah=(Math.sqrt(hdur2-tt*tt)/dur) * (donut+65*Math.cos(k*a+z*i/nn));
L=blah*Math.cos(i*z+a);
T=blah*Math.sin(i*z+a);
id[i].style.left=Math.round((50+L)*10)/10+'%';
id[i].style.top =Math.round((50+T)*10)/10+'%';
id[i].style.width=Math.sqrt(4+Math.floor(L*L+T*T))+"px";
id[i].style.height=Math.sqrt(4+Math.floor(L*L+T*T))+"px";
if(Math.random()<0.01){
id[i].style.backgroundColor='rgb('
+Math.round(+Math.random()*191)+','
+Math.round(+Math.random()*191)+','
+Math.round(+Math.random()*191)+')';
}
}
a+=ai;
time++;
if(time
}else{
setTimeout('again();',inter);
}
}
again();
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
