## Putting Together the Mathematics So Far

We’ve established the relationship:

^{2}= a

^{2}− b

^{2}

We also saw earlier that *eccentricity* can be defined as:

This gives us enough to interrelate the four quantities:

- a — semi-major axis
- b — semi-minor axis
- c — focal distance
*e*—*eccentricity*

and, given any two, calculate the other two.

In particular, we can square the second equation, rearrange it to get
c^{2} by itself and then
substitute into the first equation to get:

^{2}e

^{2}= a

^{2}− b

^{2}

This can be rearranged to get *eccentricity* as a function of
the ratio of semi-minor axis
to semi-major axis:

^{2}= 1 − ( b / a )

^{2}

or the semi-minor axis as a function of
the semi-major axis and the *eccentricity*:

^{2}= a

^{2}( 1 − e

^{2})

These equations are used at various points in the code behind all these visualisations.

It is common for the semi-major axis
and *eccentricity* to be given for an orbital body and the other
two values calculated from them.