float x; float y; float easing = 0.05; void setup() { size(480, 480); } void draw() { x += (mouseX - x) * easing; y += (mouseY - y) * easing; ellipse(x, y, 12, 12); }