I'm creating a simulation of our solar system.


I used data from https://nssdc.gsfc.nasa.gov/planetary/factsheet/ and I supplied the planets with perihelion and aphelion values. But I'm afraid the orbits themselves don't have the correct angle. Since the date of each planet when it reaches its perihelion and aphelion differ. I realise that in my simulation, there are 2 moments in the orbital period, where the planet reaches its closest distance from the sun. Same goes for the furthest distance... This is because the center of all orbits, is the sun, while it should be the "center of force" of the orbit.

Can the angle and center position of the orbits (not the Orbital inclination) be calculated? Maybe with Orbital Eccentricity? Or are there data sheets for this somewhere as well?

Thank you!

enter image description here

Simulation: https://codepen.io/DerkJanS/full/OJMRgvW

UPDATE: I know have this:

enter image description here

Based on http://www.planetaryorbits.com/

  • 1
    $\begingroup$ your orbits are all wrong, they should look like notizblock.yukterez.net/viewtopic.php?p=826#p826 $\endgroup$ – Gendergaga Jun 22 at 15:34
  • $\begingroup$ The Sun is not supposed to be at the center of the ellipses. It’s supposed to be at a focus point of each ellipse. $\endgroup$ – G. Smith Jun 22 at 16:10
  • $\begingroup$ Thank you @Yukterez and G.Smith I was assuming I could do a "simulation" of the solar system, but apparently I really need to simulate physics instead of only trying to only visually simulate them. If that makes sense. See QiLinXue's answer. Very "simple", but that's the best way. $\endgroup$ – Derk Jan Speelman Jun 23 at 7:42
  • $\begingroup$ @Yukterez I updated my question with an UPDATE section. They're better now, right? :) $\endgroup$ – Derk Jan Speelman Jun 25 at 17:29

Kepler's First Law states that planets (or any orbiting body) will travel in an ellipse where the center object (in this case the Sun) is situated at the foci. This is exactly how eccentricity is defined. If $c$ is the distance between the Sun and the center of the ellipse, $a$ is the semi-major axis (the distance from Sun in the factsheet you posted) then the eccentricity of the orbit is $$e=\frac{c}{a}$$ This will allow your simulation to be much more realistic and ensure that there is only one closest and farthest approach, which are the perihelion and aphelion.

| cite | improve this answer | |
  • $\begingroup$ You are right. Instead of trying to only visually simulate the orbits, I need to simulate the physics applied to them. That's the the best if not the only way to get this right. Thank you! $\endgroup$ – Derk Jan Speelman Jun 23 at 7:44

Not the answer you're looking for? Browse other questions tagged or ask your own question.