#codecember 2020 #day6

int n = 10,cx=300,cy=300,scl = 10;
ArrayList<Float> len = new ArrayList<Float>();
ArrayList<Float> speed = new ArrayList<Float>();

void setup() {
  size(600,600);
  for(int i = 0; i < n; i++) {
    len.add(random(TWO_PI));
    speed.add(random(0.01,0.1));
  }
}

void draw() {
  background(0);
  stroke(255);
  strokeWeight(10);
  noFill();
  for(int i = 0; i < n; i++) {
    arc(cx, cy,(i+1.5)*scl*5, (i+1.5)*scl*5, frameCount*speed.get(i), frameCount*speed.get(i)+len.get(i));
  }
}
1 Like