Advertisement
xeromino

monk

Jun 3rd, 2014
310
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.58 KB | None | 0 0
  1. PImage img;
  2. int num=12;
  3. float theta, radius = 170, sz;
  4.  
  5. void setup() {
  6.   img = loadImage("http://i.imgur.com/rVnFQo3.jpg");
  7.   size(img.width, img.height);
  8. }
  9.  
  10. void draw() {
  11.   image(img, 0, 0);
  12.   fill(#6791FF, 100);
  13.   stroke(255,200);
  14.   strokeWeight(2);
  15.   noStroke();
  16.   for (int i=0; i<num; i++) {
  17.     float x = width/2 + cos(theta+TWO_PI/num*i)*radius ;
  18.     float y = 220 + sin(theta+TWO_PI/num*i)*radius ;
  19.     sz = map(y,0,height,20,150);
  20.     ellipse(x, y, sz, sz);
  21.   }
  22.  
  23.   theta += 0.0523/3;
  24.   //saveFrame("image-###.gif");
  25.   //if (theta > TWO_PI/12) noLoop();
  26.  
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement