Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- color bg = #95729C;
- color str = #B7AACF;
- float theta, arcFin, diam, num;
- void setup() {
- size(500, 500);
- background(bg);
- noFill();
- stroke(str);
- strokeCap(SQUARE);
- diam = 200;
- num = 2;
- }
- void draw() {
- background(bg);
- for (int i=0; i<num; i++) {
- float step = TAU/num;
- arcFin = map(sin(theta), -1, 1, i*step+ radians(1), i*step + step + radians(-2));
- float sw = map(sin(theta), -1, 1, 20, 50 );
- strokeWeight(sw);
- arc(width/2, height/2, diam, diam, i*step, arcFin);
- }
- theta += 0.0523;
- if (frameCount % 2 == 0 & frameCount<121) saveFrame("image-####.gif");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement