Advertisement
xeromino

example

Nov 10th, 2015
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.38 KB | None | 0 0
  1. PImage img;
  2. int stepSize=10;
  3.  
  4. void setup() {
  5.   size(100, 100);
  6.   img = loadImage("image1.jpg");
  7.   surface.setResizable(true);
  8.   surface.setSize(img.width, img.height);
  9.   for (int x=0; x<width; x+=stepSize) {
  10.     for (int y=0; y<height; y+=stepSize) {
  11.       color c = img.get(x, y);
  12.       fill(c);
  13.       noStroke();
  14.       ellipse(x, y, stepSize, stepSize);
  15.     }
  16.   }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement