For a university project, I'm creating a to scale (using real values of distance, mass etc) simulation of the solar system using Python with the aim of demonstrating Kepler's Laws.
Currently, I have a physics engine made where I calculate a planets position using Newton's Law of Universal Gravitation which looks something like the image linked.
I've only included the first 5 planets for clarity.
The next step im trying to implement is displaying the second focus of the elliptical orbits. I'm aware this will be very close to the sun for most planets although I'd still like to be able to implement it and eventually draw the ellipse. I have all relevant information available for constructing the ellipse, mainly the semi-major axis and eccentricity and positions of the objects.
My question is, knowing the position of the sun, a planet and the relevant information, how can i calculate the second focus of the ellipse. It's not something that I'd like to hardcode either as the planets orbits are affected by one another meaning that the orientation of the ellipse changes over time.
Initially, I tried creating two conceptual circles, one on the planet and one at the sun with radiuses equal to the distance to the second focus and then finding the intercept point of the two circles however this didn't work as intended. The sun is positioned at rougly (0, 0) although the first focus is actually the center of mass of the system so isn't a fixed position and is constantly moving, so ideally a solution would be a general solution that works with any two points (x1, y1), (x2, y2).
Let $a$ be the semimajor axis and $\epsilon$ be the eccentricity of the orbit. Then each focus is $a\epsilon$ from the center of the ellipse.