Advertisement
xeromino

transmogrify

Apr 1st, 2014
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.42 KB | None | 0 0
  1. float h, w, theta;
  2. int num = 20;
  3.  
  4. void setup() {
  5.   size(500, 500);
  6.   ellipseMode(CORNER);
  7.   noStroke();
  8.   fill(#202020,10);
  9.   background(255);
  10. }
  11.  
  12. void draw() {
  13.   w = 50;
  14.   h = map(sin(theta), -1, 1, w, 200);
  15.   translate(width/2, height/2);
  16.   for (int i=0; i<num; i++) {
  17.     pushMatrix();
  18.     rotate((TWO_PI/num)*i);
  19.     ellipse(-w/2, 0, w, h);
  20.     popMatrix();
  21.   }
  22.   filter(DILATE);
  23.   theta += 0.0523;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement