‹ pakt26pakt28 ›

pakt27

See /f0blog/pact-februari/

//pakt27
//ok
int index, n;
float w, h;
void setup() {
  size(640, 480, JAVA2D);
  frameRate(60);
  colorMode(HSB, 255);
  smooth();
  noStroke();
  index= 0;
  n= 80;
  w= width*0.5;
  h= height*0.5;
  background(0);
}
void draw() {
  fill(color(0, 0, 0, 51));
  rect(0, 0, width, height);
  for (int i= 0; i<n; i++) {
    float t= float(i)/n*TWO_PI;
    fill(color((sin(t)*0.15+0.15)*255.0, 255.0, 255.0, 102.0));
    float c= (sin(index*0.036+t)+cos(index*0.022-t))*0.01;
    float d= (cos(index*0.033+t)+sin(index*0.020-t))*0.01;
    float r= (sin(t)*25.0+30.0);
    ellipse(w+(sin((index*(d*0.05))+c+t)*(w*0.8)), h+(cos((index*(c*0.05))+d+t)*(h*0.7)), r*2.0, r*2.0);
  }
  index++;
}