2
$\begingroup$

I have a question that seems very similar to calculating-point-around-circumference-of-circle-given-distance-travelled and calculating-point-on-a-circle-given-an-offset, but I don't believe they are quite the same. I'm not very good at math :/

I have planets orbiting a center planet (sun). This is in 3d-space, but only 2 are used so this is safe. The things I know are:

  1. The (x,y) position of the sun (Sx, Sy).
  2. The (x,y) position of planet A (Ax, Ay).
  3. The radius (or distance) from sun to A (r).
  4. The speed in which A is traveling along the orbit in Radians/sec (s).
  5. The time that has elapsed since A last moved along the orbit (t).

What I'm looking for is some kind of formula to calculate the next (x,y) coordinate of planet A, based on it's current position, speed, and time elapsed.

Please explain the math behind this.. I know a little trig and I'm interested in learning more, especially since I'm tackling a very realistic space-simulation.

  • 0
    In truth, planets orbit elliptically about the sun. Do you take this into account, or do you assume circular orbits?2011-10-03
  • 0
    The first link you gave has the answer, for circular motion. You know the angle of travel $\phi$, so you don't even have to compute it, there is no need to calculate $D/r$.2011-10-03
  • 0
    I know in real life they are elliptical, however I'm not sure how to implement this. I realize how to construct an ellipse (with 4 points as the "control" points), but as I said I know very little math and this seems more complicated. However, if anyone would like to answer in an elliptical case rather than circular, I would be ecstatic.2011-10-03
  • 0
    If you want to pursue genuine orbits, you'll want to see [this](http://en.wikipedia.org/wiki/Kepler_orbit).2011-10-03
  • 0
    JM, my head just exploded. I don't think I'll be able to accomplish elliptical orbits.. Andre, I just realize how dumb I was :( Yes, that does answer my question. I failed to realize I had "distance traveled" by having time and speed.. *facepalm*2011-10-03
  • 0
    Someone can probably close this question as a duplicate.2011-10-03

2 Answers 2