Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Gravity (Down-to-earth explanation please --pun intended)

This topic is 6121 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, Theory as well as formulas greatly appriciated: Ok, lets just presume that I have a planet planted right in the center of my screen in my top-down 2d universe. Space station Mir approaches from the bottom right, aimming slightly to the left of the planet at a very slow speed. Lets say that space station MIR begins to orbit my planet: 1) How might I calculate the gravitational pull of the planet on the ship if the planet ways 1000 kg and the ship weighs 2 kg. 2) How do I immitate the ship entering the eliptical orbit in which the ship circumnavigates the planet if I were to know the ships velocity. 3) Do I need to use momentum? 4) How much of a feat would this be to accomplish? Could I get away with using simple triginometry and laws of physics? Your help is greatly appriciated. Ciphersoftware website

Support the open source community

Share this post

Link to post
Share on other sites
F = (G*m1*m2)/r^2

Where F is the force due to gravity, G is the universal gravitational constant, m1 and m2 are the masses of the two objects (one being the planet, the other being the space station or whatever) and r being the distance from the CENTER of the object being orbited and the object that is doing the orbiting.

Since also, F = ma, you can determine the acceleration, in this case it being centripital acceleration (towards the center), thus being able to get the velocity vector at any given point. That''s really all there is to it, and you can thank Newton for that

Free Speech, Free Sklyarov
Fight the unconstitutional DMCA.

Commander M

Share this post

Link to post
Share on other sites
Original post by Ciphersoftware
Ok, but how do I divide the acceleration vector into x,y compenents? I know its accelerating towards the center of the planet, but what is the acceleration in terms of x,y?

where theta is the angle, and d is the magnitude part of the vector...
you might have to diddle with this, though, because of the way computers handle angles... for example, you might get the right answers except y is negative or something.

also, to get an orbit, and not just the MIR bending around the earth and the flying off into space (or worse yet, falling into the planet), the gravitational force must equal the inertia (or momentum, i haven''t been in a physics class for years).

--- krez (krezisback@aol.com)

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!