Advertisement
xeromino

elephants

Dec 7th, 2013
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.49 KB | None | 0 0
  1. float theta;
  2.  
  3. void setup() {
  4.   size(500, 500);
  5.   strokeCap(SQUARE);
  6. }
  7.  
  8. void draw() {
  9.   background(#DDCFA1);
  10.   //background(#B6BF81);
  11.   //background(#ffffff);
  12.   noFill();
  13.   stroke(235);
  14.   float start = map(sin(theta), -1, 1, PI-radians(3), TAU+HALF_PI-radians(1));
  15.   float sw = map(sin(theta), -1, 1, 80,30);
  16.   strokeWeight(sw);
  17.   arc(width/2, height/2, 300, 300, start, TAU+PI/2 );
  18.  
  19.   theta += 0.0523;
  20.  
  21.   if (frameCount % 2 == 0 && frameCount < 121) saveFrame("image-####.gif");
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement