## One planet, two suns, ellipse or hyperbola?

I've got a nifty java program done which calculates the orbit of a body around a gravity source.

The math and physics are all done for a body around a single gravity source and how to figure whether it's an ellipse, parabola, hyperbola or straight line. But now I've got a new problem.

If I have two gravity sources, like a dual-star system, what kind of geometric path will a satellite form in relation to the two big GSs? Will it be a conic section??

And don't tell me it's impossible!! They've already found one!!

http://www.time.com/time/health/arti...093423,00.html
 Blog Entries: 8 Recognitions: Gold Member Science Advisor Staff Emeritus This is the three body problem. As far as I know, there is no known formula for such a trajectory. It is only known in special cases. Here is a nice applet that plots a satellite travelling between two suns: http://alecjacobson.com/programs/three-body-chaos/
 Hi rapidrain the answer is: neither. the kind of trajectories you are looking for are the solutions of the two bodies problem. there is no general solution for more than 2 bodies. What you must do in your applet is not try to plot your object on known trajectories, but instead simulate what happens step by step by adjusting for each object its position because of its velocity one delta-t before, then calculate the forces, deduce the acceleration, modify the velocity, and do another delta-t etc. etc. Cheers...

## One planet, two suns, ellipse or hyperbola?

What you are looking for is the "restricted three body" problem. That's when you have two bodies in circular orbits, and a third planet.

Here is a java applet

http://mint.sbg.ac.at/rudi/astro/arnsdorf.html
 Thank you all for your replies. Imagine taking each of the two gravity sources individually and for an increment of time add the two trajectories. Position and velocity vectors. Then attack the problem anew. I could do this using interations in computer program. Would that be mathematically acceptable?
 Mentor Add accelerations (which corresponds to adding forces), not positions and velocities. This can be used to determine velocity and position iteratively, and is the usual approach to model those systems.