I hope anyone around here will be able to help me. I'm about to program a Space Shooter, but for that reason I need some physical formula (for a implemented random sun system generator). The following stuff I need curreently:
A formula for correct calculation of distance from Object to Object.
Some formlua for calculation of rotation speed, angle and so on and do far of Objects (Planet around Planet, Moon arouind Planet, Asteroids around around Sun, Sun around Sun, and so on).
Another formula I need for the calculation of the planets Atmossphere (like how high high the percentage of which element is, how big the atmossphere could be and so on).
The last one I need (for now ^^) is a formula for the cacluation of a objects lifetime in space (like suns, planets, asteroids, meteorites, etc.)
I hope you can help me .
Sun System Physics
Distance, s, from object A to object B, where A is located at (a,b,c) and B is located at (d,e,f) is given by Pythagoras:
s = SQRT((a-d)^2 + (b-e)^2 + (c-f)^2)
Orbital calculations: assuming a two-body system in which a secondary body of mass m orbits a primary body of mass M, with separation a, the time period T is given by:
T = SQRT( (4*pi^2*a^3) / (G*(M+m)) )
Where G is the universal gravitational constant.
It makes things a whole lot easier if you use SI units in the calculation so you don't have to worry about some customised value of G in ghastly units like AU^3 Earth-masses^-1 Earth-years^-2...
As for rotation speed, there are a few calculations you can do to find how long it takes for a planet to enter synchronous rotation - i.e. one side permanently facing the star, but I don't know those. There is another calculation based on similar physics for the maximum mass of moon in orbit.
s = SQRT((a-d)^2 + (b-e)^2 + (c-f)^2)
Orbital calculations: assuming a two-body system in which a secondary body of mass m orbits a primary body of mass M, with separation a, the time period T is given by:
T = SQRT( (4*pi^2*a^3) / (G*(M+m)) )
Where G is the universal gravitational constant.
It makes things a whole lot easier if you use SI units in the calculation so you don't have to worry about some customised value of G in ghastly units like AU^3 Earth-masses^-1 Earth-years^-2...
As for rotation speed, there are a few calculations you can do to find how long it takes for a planet to enter synchronous rotation - i.e. one side permanently facing the star, but I don't know those. There is another calculation based on similar physics for the maximum mass of moon in orbit.
@chaos syndrome:
Thjx for the formua, can you please explain how to use them in detail? I dunno some of the vars and identifiers you wrote. Like what the heck means SQRT? With the A=(a,b,c) you mean the position vector of the Object right?
By the way how big is the Universal Gravitional COnstant?
Sorry for this dumb wuestion, but I only had Astronomy one year in school and we never learned anything about that. Only Keplers Formulas (the three ones), but they're not detailed enough.
Thjx for the formua, can you please explain how to use them in detail? I dunno some of the vars and identifiers you wrote. Like what the heck means SQRT? With the A=(a,b,c) you mean the position vector of the Object right?
By the way how big is the Universal Gravitional COnstant?
Sorry for this dumb wuestion, but I only had Astronomy one year in school and we never learned anything about that. Only Keplers Formulas (the three ones), but they're not detailed enough.
G = 6.672 X 10^(-11) N m^2 / kg^2,
were N = newtons, m = meters, kg = kilogram.
Actually, G is a very small constant. Because of its value, gravity is very week. According to general relativity, the true gravitationnal constant is not G, but
k = 8 pi G / c^4 = 2.076 X 10^(-43) meters/joule.
This is a measure of the "elasticity" of space and time (which aren't absolute, or "rigid", in relativity theory).
were N = newtons, m = meters, kg = kilogram.
Actually, G is a very small constant. Because of its value, gravity is very week. According to general relativity, the true gravitationnal constant is not G, but
k = 8 pi G / c^4 = 2.076 X 10^(-43) meters/joule.
This is a measure of the "elasticity" of space and time (which aren't absolute, or "rigid", in relativity theory).
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"
SQRT(x) means the square root of x, as the format here does not allow me to write nice formatted square root signs.
The gravitational constant is a constant of proportionality. Newton stated that the gravitational force, F between two objects is directly proportional to the mass of each body (m and M), thus we have
F α m
F α M
With α being a symbol which means "is directly proportional to"
Newton also stated that the force on the masses is inversely proportional to the square of the distance between the two masses (a), which is written:
F α 1/(a^2)
These three expressions can be combined:
F α m*M/(a^2)
This can then be rewritten as an equation by replacing the proportionality sign α with the equals sign =, and multiplying the right-hand side by a constant, which in the case of the gravitation equation is called G:
F = G*m*M / (a^2)
Now not only must the numbers on both sides of an equation be equal, the units must also be equal. Thus the gravitational constant has the units m^3 kg^-1 s^-2. From detailed experimental results, it has been worked out that the value of the gravitational constant is
6.673x10^-11 m^3 kg^-1 s^-2
This is then used in the equation, with mass measured in kilograms, distance in metres and force in newtons. This value is available from Google, as are various conversions which might be handy, such as the mass of the earth in kilograms.
The time period equation is derived from applying this equation to circular motion around the centre of mass.
-----
Yes, I was talking about the position vector in the distance equation.
The gravitational constant is a constant of proportionality. Newton stated that the gravitational force, F between two objects is directly proportional to the mass of each body (m and M), thus we have
F α m
F α M
With α being a symbol which means "is directly proportional to"
Newton also stated that the force on the masses is inversely proportional to the square of the distance between the two masses (a), which is written:
F α 1/(a^2)
These three expressions can be combined:
F α m*M/(a^2)
This can then be rewritten as an equation by replacing the proportionality sign α with the equals sign =, and multiplying the right-hand side by a constant, which in the case of the gravitation equation is called G:
F = G*m*M / (a^2)
Now not only must the numbers on both sides of an equation be equal, the units must also be equal. Thus the gravitational constant has the units m^3 kg^-1 s^-2. From detailed experimental results, it has been worked out that the value of the gravitational constant is
6.673x10^-11 m^3 kg^-1 s^-2
This is then used in the equation, with mass measured in kilograms, distance in metres and force in newtons. This value is available from Google, as are various conversions which might be handy, such as the mass of the earth in kilograms.
The time period equation is derived from applying this equation to circular motion around the centre of mass.
-----
Yes, I was talking about the position vector in the distance equation.