float offset = 0; void setup() { size(1200, 800); } void draw() { background(0); stroke(255); noFill(); for (int x = 0; x < width; x += 5) { float angle = x * 0.05 + offset; float y = height / 2 + sin(angle) * 50; ellipse(x, y, 10, 10); } offset += 0.05; }