Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Modeling eliptical motion of planets

  1. Nov 30, 2007 #1
    I am trying to write a simple java program to model the motion of planets according to kepler's second law. I have everything working...except I can't find how to find an equation relating position and time. I have

    x = a cos(t)
    y = b sin(t)

    where a and b are the semimajor and semiminor axises respectively, but those equations are for uniform velocity which planets do not exhibit. I've googled around and looked in a few books but I can not find any such equation. I can find the equation for velocity...but I need a model for the actual position. Does anyone know of any such model or have any suggestions?
  2. jcsd
  3. Dec 1, 2007 #2

    D H

    Staff: Mentor

    A couple of caveats first. Kepler's laws are not quite correct. The solar system comprises the sun, eight planets, at least three dwarf planets, and a very large number of smaller bodies. Newton's law of gravitation dictates that these planets, etc will interact with each other as well as with the sun. Moreover, Newton's law of gravitation itself is not quite correct. General relativity is our best model of gravitation to date.

    Bottom line: You can use Kepler's laws to propagate the states of the planets. The results however will slowly degrade in accuracy over time, eventually become little more than fiction.

    The second caveat is that you have are treating this as a two dimensional problem. You need to go to three dimensions if you want to have more than one planet. Each planet has its own orbital plane that is slightly different from that of any other planet. Moreover, the planets have different arguments of perihelion.

    The second law section of the Wikipedia article on Kepler's laws gives a four step algorithm for applying Kepler's second law. You need to add one more simple step to get the position of the planet in the orbital plane and with the positive x axis aligned with the perihelion position: [itex]x=r\cos\theta, y=r\sin\theta[/itex].

    You will need to use orbital elements get something that is quite a bit more realistic and still uses Kepler's laws.
  4. Dec 1, 2007 #3


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    Dearly Missed

    While it is true that general relativity is needed in order to for example fully account for the orbit of Mercury, relativistic effects should not be significantly appreciable for the rest of the Solar system.

    The (3-D!!) Newtonian simplification is more than adequate in most cases concerning celestial mechanics.
  5. Dec 1, 2007 #4

    D H

    Staff: Mentor

    I agree that with the exception of Mercury, Newton's Laws are more than adequate over a fairly long time span (thousands/tens of thousands of years, maybe a lot more??). In order to accurately model the solar system using the 3D Newtonian model one needs to consider the interactions among planets. Kepler's Laws are an additional approximation on top of Newton's laws.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?

Similar Discussions: Modeling eliptical motion of planets
  1. Distacne of planet (Replies: 9)

  2. Planet X (Replies: 1)

  3. Gravity of planets (Replies: 6)