Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void doStuff(float y) {
- colorMode(HSB, 360, 100, 100);
- pushMatrix();
- translate(width/2, y);
- float temp = map(t, t1, t2, 0, TWO_PI);
- float x = 0;
- for (int i=0; i<num; i++) {
- pushMatrix();
- rotate(TWO_PI/num*i);
- //x = map(sin(temp-HALF_PI), -1, 1, 0, 100);
- if (temp<PI) {
- float T = ((frameCount-1.0-inFrames)/(otherFrames/2)) % 1;
- x = map( ease(T, 4.0, 4.0), 0, 1, 0, 100 );
- } else {
- float T = ((frameCount-1.0-inFrames-otherFrames/2)/(otherFrames/2)) % 1;
- x = map( ease(T, 4.0, 4.0), 0, 1, 100, 0 );
- }
- int col = int(360.0/num*i);
- fill(col, 90, 90);
- //noFill();
- float arcLength = TWO_PI/num;
- arc(x, 0, 95, 95, -arcLength/2, arcLength/2+radians(1));
- popMatrix();
- }
- fill(#000000);
- float sz = map(sin(temp-HALF_PI), -1, 1, 100, 0);
- ellipse(0, 0, sz, sz);
- colorMode(RGB, 255);
- popMatrix();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement