float x = 0; float y = 0; float s = 20; void setup() { size(800, 800); background(255); fill(0, 100); smooth(); rectMode(CENTER); } void draw() { s =( x+y) / 7.5; rect(x, y, s, s); x = x + 50; if (x > width) { x = 0; y += 50; } }