/* Draw a grid of rectangles along the canvas, starting at (20, 20) and ending at (width-20, height-20). */ size(400, 400); int y = 20; while (y < height - 20) { int x = 20; while (x < width - 20) { rect(x, y, 20, 20); x = x + 20; } y = y + 20; } /* int y = 20; while (y < height - 20) { int x = 20; while (x < width - 20) { rect(x, y, 20, 20); x = x + 20; } y = y + 20; } */