float x = 0; float y = 0; float s = 30; void setup() { size(800, 800); background(255); fill(0); smooth(); rectMode(CENTER); noStroke(); } void draw() { if (random(10) > 9) { s = 10; } else { s = 30; } rect(x, y, s, s); x += 50; if (x > width) { x = 0; y += 50; } }