Solar-system simulation
An object-oriented simulation of moving celestial bodies.

Bodies with changing state
Each body stores mass, position, and velocity. A System object holds the bodies and computes acceleration from the gravitational pull of the others. Each update changes velocity and then advances position by a fixed time step.
Turning the model into a drawing
The drawing code converts simulated positions into screen coordinates using a pixels-per-meter scale. An image-based extension replaces the simple body markers with planet images. The Body class handles one object’s state and drawing; the System class handles interactions.
A first numerical simulation
This was an exercise in object-oriented programming and stepping a physical model forward in time. The simple update rule and display scaling make it useful for seeing motion, but I did not validate it as a precision orbital model.