press Spacebar to change between color and black/white, b to toggle blur, press r to restart
A fork of Sphiral minima by jWilliam Dunn
xxxxxxxxxx
float d=0, r=0, f, s=6;
boolean Color=false,blur=false;
void setup() {
size(600,600);
f=height;
colorMode(HSB, 1000, 255, 255, 100);
background(850);
}
void draw() {
noStroke();
if(blur){
fill(850,30);
rect(0,0,width,height)
}else{
background(850);
}
translate(width/2, height/2);
fill(250);
for (int i=0; i<1080; i++) {
if (Color==true) {
fill(i, 255, 255);
}
ellipse(sin(-i)*r, cos(-i)*r, s, s);
r=(((f*2)-(s*2))*cos((d+i)*sin(d/1000000)*5/PI)/4);
}
d++;
}
void keyPressed() {
if (key==' ') {
Color=(!Color);
}
if (key=='r') {
background(850);
d=0;
}
if (key=='b') {
blur=(!blur);
}
}