Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float theta;
- color bg = #951F2B ;
- color s = #F5F4D7 ;
- color f = #A5A36C ;
- void setup() {
- size(500, 500);
- strokeCap(SQUARE);
- frameRate(30);
- }
- void draw() {
- background(bg);
- fill(f);
- stroke(s);
- float gap = radians(15);
- float start = map(sin(theta), -1, 1, PI*1.5+gap, TAU+PI*0.5-gap);
- float end = map(sin(-theta), -1, 1, TAU+PI*0.5+gap, TAU+PI*1.5-gap);
- float sw = map(sin(theta), -1, 1, 80, 30);
- strokeWeight(sw);
- arc(width/2, height/2, 300, 300, start, end );
- theta += 0.0523;
- if (frameCount % 2 == 0 && frameCount < 121) saveFrame("image-####.gif");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement