xxxxxxxxxx
int circles=6, xStep=5, yStep=6;
float r = 30, theta, v;
void setup() {
size(540, 540);
smooth(8);
noFill();
}
void draw() {
background(20);
drawCircle();
drawLines();
v+=0.25;
//if (v<=yStep) saveFrame("image-###.gif");
if (v==yStep) v=0;
}
void drawCircle() {
stroke(255);
strokeWeight(1);
for (int i=0; i<circles; i++) {
float d = (i+1)*r*2;
float x = width/2+r*circles-r*(i+.5);
ellipse(x, height/2, d, d);
float x2 = width/2-r*circles+r*(i+1.5);
if (i!=circles-1) arc(x2, height/2, d, d, PI, TWO_PI);
}
}
void drawLines() {
for (int y=0; y<height; y+=yStep) {
stroke(20);
strokeWeight(2);
line(0, y+v, width, y+v);
}
}