Hello! This Is my first post on the official SimpleRockets 2 website. I have been playing SimpleRockets for a long time, and I am a huge fan of all physics games (like SimpleRockets and SimplePlanes) !

For my first post, I want to show you the complicated equations that SimpleRockets 2 will be solving every single game frame, just to let you know where your precious little rocket currently is. This should be a small introduction to all our SimplePlanes friends, to show them a bit of our lives!

To do that we are first gonna look at the three keplerian laws of orbital motion (please read this quotes in an ancient german accent):

-The orbit of a planet is an ellipse with the Sun at one of the two foci.

-A line segment joining the planet and the Sun sweeps out equal areas during equal intervals of time.

-The square of the orbital period of the planet is proportional to the cube of the semi-major-axis of its orbit.

If you see this for the first time you're probably thinking, what the hell does that even mean? And also why would this be true? Well... obviously it's true because some old clever guy said it, so let's leave that question there.

Now I would like to break down theese rules for you:

'The orbit of a planet is an ellipse with the Sun at one of the two foci.'

The shape you see here is an ellipse. The planet will be orbiting at this along this blue line. And the position of the sun is one of the two foci(F1 or F2). In this Image you can already see two of the keplerian elements. They will be relevant later:

-**a, the Semi-Major-Axis**

-**e, the Eccentricity of the orbit**

This law already tells you what the exact path of your orbit is gonna be. (SideNote: When I am talking a lot about planets orbiting the sun, but this can also be applied for rockets orbiting a planet!)

'A line segment joining the planet and the Sun sweeps out equal areas during equal intervals of time.'

This is probably the most confusing law of the three. It basically says that both A1 and A2 have the same area. Following the law this means that the time it took the planet to travel through area A1 is the same amount of time it took it to cross area A2. This law is also the reason why the planet is travelling faster when it is closer to the sun. This is especially obvious for comets.

'The square of the orbital period of the planet is proportional to the cube of the semi-major-axis of its orbit.'

This is pretty simple. Basically there is always a constant ratio between the square of the orbital period (time it takes the planet to revolve around the sun once) and the cube of the Semi-Major-Axis.

Some more important terms:

The only important variable in this image is v, the true anomaly. All other parameters only define the orientation of the orbit in 3D - Space. The True Anomaly v is the angle from the planet to the sun and its point of closest approach to the sun(Periapsis). This is the angle we want to figure out to then get our position in space.

Point F is the sun. Point C is the center of the ellipse. The red point P is our planet. The red line is our orbital path. The blue line is the auxiliary circle containing the ellipse. The next important angle is E, the Eccentric Anomaly. In this picture you can see how it is constructed.

Like The Eccentric Anomaly but this angle increases at a constant rate. And because with keplers third law we can easily figure out the orbital period, we can easily know how much we have to increase this angle for every time interval.

Bringing it all together:

Now It's time to dive into the equations:

We first have to calculate the Eccentric Anomaly E, with the mean Anomaly M and the orbits eccentricity e. This equation is really hard to solve, since we need E, but we can't just use algebra to get an equation just for E, but there are a few ways around it. (I might show this next time)

Now that we have E, all we need is the True Anomaly and the distance to the sun, and then we have our exact position!

For the True Anomaly there is a simple equation:

Now we know at which angle we are as seen from the planet at an given time. How about the distance. If we multiply the distance by the unit vector pointing in this direction we have our position.

I dont have a picture here but this is the equation:

'r = a*(1-e*cos(E))^2'

Where a is the Semi-Major-Axis, e the eccentricity of the orbit and E our Eccentric Anomaly.

Pretty simple right?

If you like this kind of post please let me know and I may do some more!

So much maths... my head!😖