Created
September 15, 2015 01:45
-
-
Save claytical/23facb0f65e13b23f140 to your computer and use it in GitHub Desktop.
Zeno's Paradox
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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