# Are the orbits in my simulation correct? [closed]

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!

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

UPDATE: I know have this:

• your orbits are all wrong, they should look like notizblock.yukterez.net/viewtopic.php?p=826#p826 – Gendergaga Jun 22 at 15:34
• 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. – G. Smith Jun 22 at 16:10
• 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. – Derk Jan Speelman Jun 23 at 7:42
• @Yukterez I updated my question with an UPDATE section. They're better now, right? :) – 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.