cirlces on circles
@author
int NUM = 30;
float RADIOUS = 100;
void setup(){
size(500, 500);
background(0);
}
void draw(){
fill(0, 30);
noStroke();
rect(0, 0, width, height);
noFill();
stroke(255, 100, 0);
strokeWeight(2);
translate(width / 2, height / 2);
float angStep = TWO_PI / NUM;
for(int i = 0; i < NUM; i++){
pushMatrix();
float cx = RADIOUS * cos(angStep * i);
float cy = RADIOUS * sin(angStep * i);
translate(cx, cy);
float angle = frameCount * 0.01;
angle *= i % 2 == 0 ? -1: 1;
rotate(angle + angStep * i + PI);
ellipse(RADIOUS, 0, 50, 50);
popMatrix();
}
}