- #1

- 153

- 3

I'm writing a javascript application to illustrate gravitational attraction between masses, but am getting hung up on some of the details, particularly mow far masses move in response to each other's gravitation.

I've read all available wikipedia articles on gravity and have come up with the following:

Gravitational constant: (6.67408 x 10^-11 meters^3) / (kilos * seconds^2)

Force between masses: G * (mass 1 in kilos * mass 2 in kilos) / (distance in meters ^2)

Now for a concrete example

Mass 1: 1 kilo

Mass 2: 5 kilos

Distance: 1 meter

Seconds: 1

Pluging that into above yeilds

f = (667408 * 1^3 * 1 * 5) / ( 10^11 * 1 * 1 * 1^2)

which reduces to

f = 667408 * 5 / 10^11

f = 3.33704 x 10^6 / 10^11

f = 3.33704 x 10^-5

Simple enough, but here's where I'm getting lost. How far would the 1 kg mass move and how far would the 5 kg mass move in response to this force?

Secondly, so long as all values in f = G x m1 * m2 / d^2 are converted to metric, is "G" just 6.67408 x 10^-11

Thanks for any help