Cursor Gravity(richardsimoes.com)
richardsimoes.com
Cursor Gravity
http://www.richardsimoes.com/gravity.html
7 comments
It's surprisingly fun for such a simple little thing, especially since the lack of friction makes it so much more compelling than the "marble in a bowl" demonstration I got when I was a kid.
Would work fine in IE if he just added the ExplorerCanvas js file (from Google) http://excanvas.sourceforge.net/
He's used the Euler method, which I think is why you get aberrant behaviour when the cursor comes near the particle:
http://en.wikipedia.org/wiki/Euler's_method#Error
http://en.wikipedia.org/wiki/Euler's_method#Error
This also serves as a good repro of a Firefox memory leak (watch your task manager while it's running). There won't be many usable canvas apps until their JS engine is tightened up or replaced.
No, it gcs after a while. Memory usage steadily climbs until it hits a certain point and then drops back down.
[deleted]
I used to do this with a large magnet and a little chip off the magnet... accidentally figured out how orbits work. Fun times. :)
Nice little toy, but what's the next level? 2 objects, try to get a stable orbit? Talk about a steep difficulty curve. (http://en.wikipedia.org/wiki/N-body_problem)