A simulation written in python using the pygame library.
There is a relitively simple formula for determining gravitational forces between two bodies in a vacuum.
The velocity of a body with mass can be affected by another body with mass with the following formula:
[force] = [gravitational constant] x [self mass] * [other body mass] / [distance]^2
[theta] = arctangent([distance x], [distance y])
[change in x velocity] = cosine([theta]) * [force]
[change in y velocity] = sine([theta]) * [force]
You will need a Python 3 environment with pygame installed.
pip install pygame
python3 orbit.py