OZONE Asylum
FAQ
How do I make orbiting planets in dhtml?
This page's ID:
5005
Search
QuickChanges
Forums
FAQ
Archives
Register
You are editing "How do I make orbiting planets in dhtml?"
Who can edit an FAQ?
Anyone registered may edit an FAQ.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
According to Slime, Orbits are caused by the struggle between the acceleration of gravity pulling the object inwards, and inertia (the object's natural tendancy to go forwards.) When these two things work together, the object tries to move to the side, but then is pulled in a little bit, then moves to the side, and is pulled in again, causing it to go in a circle. [IMG]http://www.slimeland.com/misc/orbitexample.jpg[/IMG] Note that the "pulling" is only done on the velocity, which in turn changes the way that the object moves. The object's position itself isn't changed directly by acceleration. (acceleration changes velocity, velocity changes position.) And all that's necessary to cause this effect is to continually pull the velocity vector towards the gravitational source. This is done by adding (the direction to the gravitational source times some constant) to the velocity vector. ---------------------------- Relevant threads: [url=http://www.ozoneasylum.com/Forum2/HTML/001811.html]FINALLY started controlling my movements with vectors [/url] [url=http://www.ozoneasylum.com/Archives/Archive-000003/HTML/20020912-2-001365.html]Sliding animation with acceleration & deceleration math?[/url] ---------------------------- Relevant links: [url=http://tech.irt.org/articles/js214/]JavaScript Bouncing Balls[/url] ______________________ [small][i](Edited by: [url=http://www.ozoneasylum.com/cgi-bin/ubbmisc.cgi?action=getbio&UserName=InI]InI [/url] on Tue 08-Oct-2002)[/i][/small] [small][i](Edited by: [url=http://www.ozoneasylum.com/cgi-bin/ubbmisc.cgi?action=getbio&UserName=Emperor]Emperor [/url] on Wed 09-Oct-2002)[/i][/small]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »