Advertisement
xeromino

Untitled

Dec 7th, 2013
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.60 KB | None | 0 0
  1. float theta;
  2. color bg = #951F2B ;
  3. color s = #F5F4D7 ;
  4. color f = #A5A36C ;
  5.  
  6. void setup() {
  7.   size(500, 500);
  8.   strokeCap(SQUARE);
  9.   frameRate(30);
  10. }
  11.  
  12. void draw() {
  13.   background(bg);
  14.   fill(f);
  15.   stroke(s);
  16.   float gap = radians(15);
  17.   float start = map(sin(theta), -1, 1, PI*1.5+gap, TAU+PI*0.5-gap);
  18.   float end = map(sin(-theta), -1, 1, TAU+PI*0.5+gap, TAU+PI*1.5-gap);
  19.   float sw = map(sin(theta), -1, 1, 80, 30);
  20.   strokeWeight(sw);
  21.   arc(width/2, height/2, 300, 300, start, end );
  22.  
  23.   theta += 0.0523;
  24.  
  25.   if (frameCount % 2 == 0 && frameCount < 121) saveFrame("image-####.gif");
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement