Hi Processing community!
I just created the following slit collage which randomly places areas of the image on the x axis. How do I make my image into a grid of random areas of the image by adding the y axis?
Now:
Goal:
Code
PImage img;
void setup(){
  size(1800,800);
  img = loadImage("3d.png");
  img.resize(1800,800);
}
void draw(){
  background(0);
  int w = 10;
  for(int x = 0; x < width; x += w){
    int r = int(random(0,width-w));
    copy(img, r, 0, w, height, x, 0, w, height);
    noFill();
    stroke(0);
    rect(x, 0, w, height);
  }
  noLoop();
}

