Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PImage img;
- int num=12;
- float theta, radius = 170, sz;
- void setup() {
- img = loadImage("http://i.imgur.com/rVnFQo3.jpg");
- size(img.width, img.height);
- }
- void draw() {
- image(img, 0, 0);
- fill(#6791FF, 100);
- stroke(255,200);
- strokeWeight(2);
- noStroke();
- for (int i=0; i<num; i++) {
- float x = width/2 + cos(theta+TWO_PI/num*i)*radius ;
- float y = 220 + sin(theta+TWO_PI/num*i)*radius ;
- sz = map(y,0,height,20,150);
- ellipse(x, y, sz, sz);
- }
- theta += 0.0523/3;
- //saveFrame("image-###.gif");
- //if (theta > TWO_PI/12) noLoop();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement