Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void doStuff() {
- float tt = map(t, t1, t2, 0, TWO_PI);
- float y = map(t, t1, t2, 50, 450);
- float x = 250;
- pushMatrix();
- translate(x, y);
- int num = 10;
- for (int i=0; i<num; i++) {
- pushMatrix();
- rotate(PI/2+TWO_PI/num*i);
- float px = cos(tt-PI/2)*map(sin(tt-PI/2), -1, 1, 0, 100);
- float py = sin(tt-PI/2)*map(sin(tt-PI/2), -1, 1, 0, 100);
- float scal = map(sin(tt-PI/2), -1, 1, 1, 3);
- pushMatrix();
- translate(px,py);
- float r = map(sin(tt-PI/2),-1,1,0,TWO_PI);
- float x2 = map(sin(tt-PI/2),-1,1,0,50);
- float sw = map(sin(tt-PI/2),-1,1,1,20);
- rotate(r);
- colorMode(HSB,360,100,100);
- stroke(360.0/num*i,90,90,200);
- //fill(360.0/num*i,90,90,200);
- strokeWeight(sw);
- noFill();
- arc(x2, 0, 100, 100, 0, (TWO_PI/num)*scal);
- colorMode(RGB,255);
- popMatrix();
- popMatrix();
- }
- popMatrix();
- noStroke();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement