pakt28
See /f0blog/pact-februari/
//pakt28
int index, n;
void setup() {
size(640, 480, JAVA2D);
frameRate(60);
colorMode(HSB, 255);
strokeCap(SQUARE);
noFill();
smooth();
index= 0;
}
void draw() {
n= int(sin(index*0.0015)*30.0+35.0);
background(0);
for (int i= 0; i<n; i++) {
float t= float(i)/n*TWO_PI;
strokeWeight(sin(index*0.0125+t)*5.0+5.5);
stroke(color((sin(t)*(sin(index*0.01)*0.2)+0.5)*255.0, (sin(index*0.004)*0.3+0.7)*255.0, 255.0));
float a1= (sin(index*(sin(index*0.0025+t)*0.01+0.01))*0.5+0.5)*TWO_PI;
float a2= (sin(a1*index*0.0005+t)*0.5+0.5)*PI;
float r= height*0.475*(1.0-float(i)/n)*2;
arc(width*0.5, height*0.5, r, r, a2, a1);
}
index++;
}