pakt16
See /f0blog/pact-februari/
//pakt16
int index;
float radius1, radius2, radius3;
float ex1, ex2, ex3;
float n;
void setup() {
size(640, 480, JAVA2D);
frameRate(60);
strokeWeight(1);
noFill();
smooth();
index= 0;
}
void draw() {
radius1= sin(index*0.013)*0.3+0.1;
radius2= sin(index*0.021)*0.2+0.25;
radius3= sin(index*0.012)*0.1+0.4;
ex1= sin(index*0.0052)*3.0+3.0;
ex2= sin(index*0.0061)*6.0+6.0;
ex3= sin(index*0.0053)*2.0+2.0;
n= sin(index*0.001)*40.0+50.0;
background(0);
translate(width*0.5, height*0.5);
for (int i= 0; i<int(n); i++) {
float t= (i/n)*TWO_PI;
stroke(255.0, 255.0, 255.0, sin((index+(i*sin(index*0.008+(i*sin(index*0.013)*0.01))*2.0))*0.1)*127.5+127.5);
float x= sin(t+ex1)*radius1*width;
float y= cos(t+ex1)*radius1*height;
float xx= sin(t+ex3)*radius3*width;
float yy= cos(t+ex3)*radius3*height;
bezier(x, y, sin(t+ex2)*radius2*width, cos(t+ex2)*radius2*height, xx, yy, xx, yy);
}
index++;
}