void setup() {
size(600, 600);
rectMode(CENTER);
}

void draw(){
background(255, 18, 18);
noStroke();

translate(width/2, height/2);

for (int i = 0; i < 8; i++) {
pushMatrix();
rotate(TWO_PI * i / 8);
float tx = 200 * sin(0.01*frameCount);
translate(tx, 0);
fill(255, 235, 8, 240);
ellipse(0, 0, 30, 30);

for (int j = 0; j < 6; j++) {
pushMatrix();
rotate(TWO_PI * j / 6);
float rx = 60 * cos(0.01*frameCount + 10);
fill(42, 10, 255);
ellipse(rx, 0, 8, 8);

for(int k = 0; k < 8; k++){
pushMatrix();
rotate(PI * k / 8);
float kx = 30 * cos(0.01*frameCount+ 5);
translate(tx,0);
fill(255, tx*2);
ellipse(0, 0, 4, 4);
popMatrix();
}
popMatrix();

pushMatrix();
rotate(TWO_PI * j / 3);
float ex = 80 * sin(0.01*frameCount + 30);
fill(0);
rect(ex, 0, 8, 8);
popMatrix();
}
popMatrix();
}
}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s