Advertisement
xeromino

photo

Jan 4th, 2014
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.57 KB | None | 0 0
  1. PImage myImage;
  2. color col;
  3. float sw, br, incr, sz;
  4. int x, y;
  5.  
  6. void setup() {
  7.   background(255);
  8.   ellipseMode(CORNER);
  9.   myImage = loadImage("http://media-cache-ak0.pinimg.com/736x/58/bd/50/58bd50274b02cfd44261b840ad20299b.jpg");
  10.   size(myImage.width, myImage.height);
  11.   myImage.loadPixels();
  12.   incr = 5;
  13.   strokeCap(SQUARE);
  14.   sz = width;
  15.   noStroke();
  16. }
  17.  
  18. void draw() {
  19.   while (x<width) {
  20.  
  21.     fill(myImage.get(x, y),200);
  22.     ellipse(x, y, sz, sz);
  23.     x += 5;
  24.     y += 4;
  25.     sz *=0.95;
  26.   }
  27. }
  28.  
  29. void keyPressed() {
  30.   save(random(123)+".png");
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement