Moon gravity acceleration
Hello everyone I am very new to DirectX and Graphics API’s in general. I would have posted this in the beginner’s section but since it has to do with physics I thought it would be ok here. This is most likely really simple for you guys/girls so here it goes.
I need an equation to calculate the fall to the earth. The ship can light boosters and try to slow or stop its decent. So if the ship starts to fall it will start to fall slowly and gain speed as its falls till it reaches a maximum velocity. I will also need to change the gravity so that the ship is pulled greater or lesser on other planets.
Thanks a million
You might want to look at this (looks quite in depth) or this. Both found from searches in Articles & Resouces. Those links should be useful, and hopefully not too complicated.
Miles
[EDIT: messed up the html as usual ]
[edited by - Miles Clapham on July 11, 2002 2:38:54 PM]
Miles
[EDIT: messed up the html as usual ]
[edited by - Miles Clapham on July 11, 2002 2:38:54 PM]
Simply to the earch or do correct calculus in space?
where:
PosShip is the position of the ship
PosStar is the position of the actual star
deltaTime is the time you want to update for
massStar is the mass of the star in Kg
distanceToStar is the distance from the ship to the star in meters
that strange number (6.672*10^-11) is the gravity-constant.
to speed up you simply can ignore stars far away enough. (can''t say a number, you have to find out yourself)
for each planet do: direction = normalized(PosStar - PosShip) vShip += deltaTime * direction * 6.672*10^-11 * massStar / (distanceToStar ^ 2)
where:
PosShip is the position of the ship
PosStar is the position of the actual star
deltaTime is the time you want to update for
massStar is the mass of the star in Kg
distanceToStar is the distance from the ship to the star in meters
that strange number (6.672*10^-11) is the gravity-constant.
to speed up you simply can ignore stars far away enough. (can''t say a number, you have to find out yourself)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement