A simple Multi-Object gravitational motion simulator made while learning about linear algebra & orbital mechanics
Create a file in the folder presets/
with the following variables:
- NAME : Name of simulation
- TIME_DELTA : Time passed per iteration
- SPACE_SCALE : Meters per pixel
- BASE_SPACE_VECTOR : Position of bottom-left coordinate of window (in real scale)
- object_list : List of objects
This simulation uses Newton's law of universal gravitation to calculate the acceleration of each object, then uses kinematics to simulate their corresponding velocity & displacement.
- Collision between objects
- Displaying vectors for each object's velocity and gravitational acceleration
- Displaying an orbit path
- Ability to add & drag objects using mouse button
- Optimization in general