pakt26
See /f0blog/pact-februari/
//pakt26
int index;
float rx, ry;
int nx, ny;
float cols, rows;
void setup() {
size(640, 480, JAVA2D);
frameRate(60);
smooth();
noStroke();
nx= 45;
ny= 9;
index= 0;
rows= ny;
ry= height/rows;
}
void draw() {
cols= (sin(index*0.001+(sin(index*0.0001)*10.0))*0.445+0.5)*(nx-1);
rx= width/cols;
fill(color(0, 0, 0, 15));
rect(0, 0, width, height);
for (int x= 0; x<cols; x++) {
for (int y= 0; y<rows; y++) {
float c= sin((index+(x*rows)+y)*cos(index*0.0012)*(sin(index*0.00006)*0.5))*0.5+0.5;
float g= c*(sin(index*0.002+(float(x)/nx*TWO_PI))*cos(index*0.0018+(float(y)/ny*TWO_PI)))*12.0+9.0;
fill(255, c*255, c*255, c*255);
rect(x*rx+g, y*ry+g, rx-(g*2), ry-(g*2));
}
}
index++;
}