size(580,320); int numRows = 5; int numCols = 3; float jumpX = 1.0 * (width-1) / numCols; float jumpY = 1.0 * (height-1) / numRows; stroke(127); for (int k=0; k <= numCols; k++) { line(k*jumpX, 0, k*jumpX, height); } for (int k=0; k <= numRows; k++) { line(0, k*jumpY, width, k*jumpY); } save("solidGrid2.png");