SHARE
TWEET

Untitled

a guest May 20th, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void setup()
  2. {
  3.   size(600, 600);
  4. }
  5.  
  6. void draw()
  7. {
  8.   background(0);
  9.  
  10.   PVector c = new PVector(width / 2, height / 2);
  11.  
  12.   ellipseMode(RADIUS);
  13.   noStroke();
  14.  
  15.   fill(255, 0, 0);  
  16.   ellipse(c.x, c.y, 250, 250);
  17.  
  18.   fill(0, 255, 0);  
  19.   ellipse(c.x, c.y, 200, 200);
  20.  
  21.   fill(0, 0, 255);  
  22.   ellipse(c.x, c.y, 150, 150);
  23.  
  24.   float a1 = TWO_PI * frameCount / 300;
  25.   float r1 = 225;
  26.   fill(255);
  27.   ellipse(c.x + cos(a1) * r1, c.y + sin(a1) * r1, 25, 25);
  28.  
  29.   float a2 = TWO_PI * frameCount / 200;
  30.   float r2 = 175;
  31.   fill(0);
  32.   ellipse(c.x + cos(a2) * r2, c.y + sin(a2) * r2, 25, 25);
  33.  
  34.   float a3 = TWO_PI * frameCount / 100;
  35.   float r3 = 125;
  36.   fill(255);
  37.   ellipse(c.x + cos(a3) * r3, c.y + sin(a3) * r3, 25, 25);
  38. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top