float x = 0, y = 0; void setup() { size(400, 400); } void draw() { background(230); // follow the mouse more naturally x = lerp(x, mouseX, .1); y = lerp(y, mouseY, .1); ellipse(x, y, 30, 30); }