Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float slices = 24;
- float orgX, orgY, theta;
- void setup() {
- size(500, 500);
- background(255);
- orgX = width/2;
- orgY = height/2;
- }
- void draw() {
- background(255);
- for (int i=0; i<slices;i++) {
- float unit = TAU/slices;
- if (i%2==0) {
- fill(#480D4A);
- }
- else {
- fill(#BB1C60);
- }
- noStroke();
- float sz = map(sin((i*unit+theta)), -1, 1, 200, 400);
- arc(orgX, orgY, sz, sz, i*unit, (i+1)*unit);
- }
- theta += 0.0523;
- if (frameCount % 4 == 0 && frameCount < 121) saveFrame("image-####.gif");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement