pakt17
See /f0blog/pact-februari/
//pakt17
int index;
float a, b, c, d;
float spread;
int n;
void setup() {
size(640, 480, JAVA2D);
frameRate(60);
noStroke();
rectMode(CENTER);
index= 0;
n= 45;
}
void draw() {
spread= sin(index*0.004)*5.0+6.0;
background(0);
for (int i= 0; i<n; i++) {
a= sin(((i*spread)+index)*sin(index*0.0050+(sin(index*0.0074+1.0)+1.0))*0.0075+1.0)*0.25+0.5;
b= sin(((i*spread)+index)*sin(index*0.0051+(sin(index*0.0073+2.0)+2.0))*0.0075+2.0)*0.25+0.5;
c= sin(((i*spread)+index)*sin(index*0.0052+(sin(index*0.0072+3.0)+3.0))*0.0075+3.0)*0.25+0.5;
d= sin(((i*spread)+index)*sin(index*0.0053+(sin(index*0.0071+4.0)+4.0))*0.0075+4.0)*0.25+0.5;
fill(a*255.0, b*255.0, c*255.0, d*255.0);
rect(a*width, b*height, (c-a)*width, (d-b)*height);
}
index++;
}