size(420, 420); background(0); smooth(); noFill(); stroke(255); for(int i = 30; i <= width - 20; i += 50) for(int j = i; j <= height - 20; j += 50) { if ((j - i) % 100 == 0) fill(255); else noFill(); ellipse(i, j, 40, 40); }