Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void setup()
- {
- size(600, 600);
- }
- void draw()
- {
- background(0);
- PVector c = new PVector(width / 2, height / 2);
- ellipseMode(RADIUS);
- noStroke();
- fill(255, 0, 0);
- ellipse(c.x, c.y, 250, 250);
- fill(0, 255, 0);
- ellipse(c.x, c.y, 200, 200);
- fill(0, 0, 255);
- ellipse(c.x, c.y, 150, 150);
- float a1 = TWO_PI * frameCount / 300;
- float r1 = 225;
- fill(255);
- ellipse(c.x + cos(a1) * r1, c.y + sin(a1) * r1, 25, 25);
- float a2 = TWO_PI * frameCount / 200;
- float r2 = 175;
- fill(0);
- ellipse(c.x + cos(a2) * r2, c.y + sin(a2) * r2, 25, 25);
- float a3 = TWO_PI * frameCount / 100;
- float r3 = 125;
- fill(255);
- ellipse(c.x + cos(a3) * r3, c.y + sin(a3) * r3, 25, 25);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement