# Simulating an orbit, primary is not at focus

I've been toying around with some -very- simple orbital simulators, mostly using preexisting physics libraries (I took a layman's stab at doing it with vectors too). The thing that is confusing me is that my orbits do not behave as in reality - the primary is always at the center of the ellipse rather than at one of the foci. I get the same result regardless of the engine or library I use.

I've simply been putting in a primary and an orbiter, with the primary at the center of the layout. I plug in the formula $$F = G\frac{m_1m_2}{r_1^2}$$ with the force directed towards the primary. I've tried adjusting the time step, but I get the same result. I'm simply confused as to what would cause this.

Update

You're right, I was multiplying, I just didn't know it (something about the way the Construct2 interpreted my commands). I had it configured to apply the force which was essentially G(arbitrary) / distance * distance (didn't like it when I tried ^2). When I put distance squared in a variable and then divided by it things worked.

Now I had tried this before in Panda3d with the same problem, so I'll have to go back and look at that.

-