Barry Thomas
Planetary Motion Source Code
This code is from my (now defunct) demo Android app. I wrote this simply as a tutorial in coding Keppler's first two laws (specifically, in Java for Android).
To get the entire source code, download this zip. Feel free to use the code for any purpose at all.
Some caveats:
- It ignores the fact that the orbits are not all exactly in the earth's ecliptic plane
- It isn't set to any particular epoch
- The sun and planets are not to scale
- Yes, I included Pluto. You say it isn't a real planet? I don't care. Sue me.
- Your Java code is better? You're probably right. This is a demo. Feel free to improve it.
Enjoy.