float gridSize = 100; float noiseStep = 0.02; void setup() { size(512, 512); } void draw() { float xstep = width/gridSize; float ystep = height/gridSize; noStroke(); for (int i = 0; i < gridSize; i++) { for (int j = 0; j < gridSize; j++) { float fillVal = noise(i*noiseStep, j*noiseStep) * 256; fill(fillVal); rect(xstep * i, ystep * j, xstep, ystep); } } // noiseStep = mouseX/(float)width * 0.1; }