‹ pakt19pakt21 ›

pakt20

See /f0blog/pact-februari/

//pakt20
//ok
int index, n;
float w, h;
float spread;
void setup() {
  size(640, 480, JAVA2D);
  frameRate(60);
  strokeWeight(1);
  background(0);
  smooth();
  index= 0;
  w= width;
  h= height;
  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)*w*0.46+(w*0.5), 
      sin(ty+cos(index*0.001*i))*(cos(ty)*0.001+1.0)*h*0.46+(h*0.5), 
      cos(ty+sin(index*0.001))*(sin(tx)*0.001+1.0)*w*0.36+(w*0.5), 
      sin(tx+cos(index*0.001*i))*(cos(ty)*0.001+1.0)*h*0.36+(h*0.5)
      );
  }
  index++;
}