xxxxxxxxxx
var d=0,r=0,e,f;
var i;
function setup() {
createCanvas(windowWidth, windowHeight);
fill(0,127);noStroke();
e=width;f=height;
}
function draw() {
background(255);
d++; if (mouseIsPressed) d+=mouseX;
for(i=1e3;i--;rect(sin(i)*r+e/2-3,cos(i)*r+f/2-3,6,6))
r=(e+f)*cos((d+i)*sin(d/1e6)*5/PI)/4;
}