pakt20
See /f0blog/pact-februari/
//pakt20
int index, n;
float spread;
void setup() {
size(640, 480, JAVA2D);
frameRate(60);
strokeWeight(1);
background(0);
smooth();
index= 0;
n= 150;
}
void draw() {
spread= sin(index*0.002);
for (int i= 0; i<n; i++) {
float tx= sin(0.012*(index+(i*spread)));
float ty= sin(0.014*(index+(i*spread)));
float tz= sin(0.016*(index+(i*spread)))*127.5+127.5;
stroke(tz, tz*0.9, tz, 13);
line(
sin(tx+sin(index*0.001))*(sin(tx)*0.001+1.0)*width*0.46+(width*0.5),
sin(ty+cos(index*0.001*i))*(cos(ty)*0.001+1.0)*height*0.46+(height*0.5),
cos(ty+sin(index*0.001))*(sin(tx)*0.001+1.0)*width*0.36+(width*0.5),
sin(tx+cos(index*0.001*i))*(cos(ty)*0.001+1.0)*height*0.36+(height*0.5)
);
}
index++;
}