with(Math){r=random;f=floor;si=sin;co=cos;pi=PI}w=window;u=0;w.onmousemove=function(b){u=b.clientX/10};function rn(b){return f(r()*b)}function rc(){return"rgb("+rn(255)+","+rn(255)+","+rn(255)+")"}
w.onload=function(){c=document.getElementById("c");c.width=500;c.height=300;o=c.getContext("2d");s=si(pi/12);k=co(pi/12);o.globalAlpha=0.8;for(j=0;j<99;j++){g=o.createLinearGradient(0,0,70,70);g.addColorStop(0,rc());g.addColorStop(1,rc());o.fillStyle=g;o.beginPath();o.arc(rn(c.width),rn(c.height),70,0,pi*2,0);o.fill()}im=new Image;im.src=c.toDataURL();ww=w.innerWidth;wh=w.innerHeight;c.width=ww;c.height=wh;o.translate(ww/2,wh/2);o.fillStyle="#fff";t=15/180*pi/2;lX=si(t)*300;lY=co(t)*300;a=[];for(i=
0;i<24;i++)a[i]=0;setInterval(function(){for(i=0;i<24;i++){o.save();o.beginPath();o.lineTo(0,0);o.lineTo(lX,-lY);o.lineTo(-lX,-lY);o.closePath();o.fill();o.clip();o.rotate(a[i]);i%2==0?a[i]+=0.01:a[i]-=0.01;o.drawImage(im,-250,-150+u);o.restore();o.transform(k,s,-s,k,0,0)}},10)};
with(Math)r=random,f=floor,si=sin,co=cos,pi=PI;
w = window;
u=0;
w.onmousemove = function(L){u=L.clientX/10};
function rn(n)
{
return f(r()*n)
}
function rc()
{
return 'rgb('+rn(255)+',' + rn(255) + ',' + rn(255) + ')'
}
w.onload = function()
{
c = document.getElementById('c');
c.width = 500;
c.height = 300;
o = c.getContext("2d");
s = si(pi/12);
k = co(pi/12);
o.globalAlpha = .8;
for (j=0;j<99;j++){
g = o.createLinearGradient(0,0,70,70);
g.addColorStop(0, rc());
g.addColorStop(1, rc());
//o.fillStyle = rc();
o.fillStyle = g;
o.beginPath();
o.arc(rn(c.width),rn(c.height),70,0,pi*2,0);
o.fill();
}
im = new Image();
im.src = c.toDataURL();
ww = w.innerWidth;
wh = w.innerHeight;
c.width = ww;
c.height = wh;
o.translate(ww/2, wh/2);
o.fillStyle = "#fff";
t= 15/ 180 * pi / 2;
lX = si(t) * 300; // radius
lY = co(t) * 300; // radius
a = [];
for (i= 0; i < 24; i++)
{
a[i] = 0;
}
setInterval(function()
{
for (i= 0; i < 24; i++)
{
o.save();
o.beginPath();
o.lineTo(0, 0);
o.lineTo(lX, - lY);
o.lineTo(- lX, - lY);
o.closePath();
o.fill();
o.clip();
o.rotate( a[i]);
(i % 2 == 0) ? a[i] += .01 : a[i] -= .01;
o.drawImage(im,-250,-150+u);
o.restore();
o.transform(k, s, -s, k, 0, 0)
}
}, 10)
}