Advertisement
proce55or

rotation

Feb 10th, 2014
576
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.54 KB | None | 0 0
  1. float r = 0;
  2.  
  3. void setup() {
  4.   size(600, 600);
  5.   background(255);
  6.   smooth();
  7. }
  8. void draw() {
  9.   stroke(0, random(0, 100));
  10.   fill(random(50, 255), 0, 0);
  11.   rotate(r);
  12.   float circle_size = random(5, 20);
  13.   ellipse( 2+r, 10, circle_size, circle_size);
  14.   fill(random(50, 255), 0, random(50, 255));
  15.   ellipse( 300 +r, 10, circle_size, circle_size);
  16.   fill(random(50, 255), 0, 255);
  17.   ellipse( 500 +r, 10, circle_size, circle_size);
  18.   r = r + 0.1;
  19. }
  20.  
  21.  
  22. void keyPressed() {
  23.   if (key == 's') {
  24.     save("normal.png");
  25.     exit();
  26.   }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement