Code
int numDots = 500;
float t, r, x, y, fraq;
void setup(){
size(400,400);
smooth();
}
void draw(){
fill(#333333,10);
rect(0,0,width,height);
translate(width/2,height/2);
pushMatrix();
{
stroke(255);
if(mousePressed){
line(pmouseX-(width/2),pmouseY-(height/2),mouseX-(width/2),mouseY-(height/2));
}
noFill();
beginShape();
rotate(millis()*0.005);
for (int i=1; i < numDots; i++) {
fraq = i/(float)numDots;
r = 50*i/150.0;
t = fraq*TWO_PI*TWO_PI;
x = r*sin(t); // circular identity
y = r*cos(t); // circular identity
vertex(x,y);
}
endShape();
}
popMatrix();
}
void keyPressed(){
if(key == ' '){
background(100);
}
}