
float x = 0.0;
float y = 0.0;
float atraso = 0.05; // de 0.0 a 1.0
void setup() {
size(300,300);
noStroke();
}
void draw() {
float targetX = mouseX;
float targetY = mouseY;
x += (targetX - x) * atraso;
y += (targetY - y) * atraso;
fill(30, 140, 250);
ellipse(x, y, 4, 4);
fill(250, 140, 30);
ellipse(x + 3, y + 3, 4, 4);
}