Skip to content

Instantly share code, notes, and snippets.

@claytical
Created September 15, 2015 01:45
Show Gist options
  • Save claytical/23facb0f65e13b23f140 to your computer and use it in GitHub Desktop.
Save claytical/23facb0f65e13b23f140 to your computer and use it in GitHub Desktop.
Zeno's Paradox
var x;
var y;
var easing;
function setup() {
createCanvas(windowWidth, windowHeight);
background(255);
easing = .025;
x = width/2;
y = height/2;
}
function draw() {
background(255);
var eX = (mouseX - x) * easing;
var eY = (mouseY - y) * easing;
x = x + eX;
y = y + eY;
ellipse(x, y, 20, 20);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment