void setup() { size(300,300); background(0); fill(255); noStroke(); smooth(); } boolean firstpress = false; float xnoise = 0.0; float ynoise = 0.0; float inc = .04; void draw () { for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { float gray = noise(xnoise, ynoise) * 255; stroke(gray); point(x,y); xnoise = xnoise + inc; } xnoise = 0; ynoise = ynoise + inc; } } void mousePressed () { if (firstpress == false) { noLoop(); firstpress = true; } else { loop(); firstpress = false; } }