/** David's project uses squares to create an abstraction of a series of images. After a given amount of marks are made, a new image is loaded, and the mark-making continues. */ String[] imageList = {"CHIPMUNK.JPG", "DEER1.JPG", "DEER2.JPG", "FOX.JPG", "DEER3.JPG", "DEER4.JPG", "DEER5.JPG", "RACOON.JPG", "SKUNK.JPG"}; int oldMinute = 0; int currMinute; PImage a; void setup() { a = loadImage(imageList[0]); size(720, 480); noStroke(); background(0); smooth(); } void draw() { float pointillize = map(mouseX, 0, width, 22, 15); int x = int(random(a.width)); int y = int(random(a.height)); color pix = a.get(x, y); fill(pix, 500); rect(x, y, pointillize, pointillize); currMinute = minute(); if (oldMinute +1 < currMinute) { // if some amout of time has passed loadNewImage(int(random(imageList.length))); oldMinute = minute(); } } void loadNewImage(int index) { a = loadImage(imageList[index]); }