A simple 2D space simulation built with Python and Pygame that demonstrates the gravitational slingshot effect. Launch a spacecraft and observe how gravity alters its path around different planets. This project visualizes how a moving object behaves under the influence of gravity. By launching spacecraft near planets, you can see how their trajectories bend, accelerate, or escape depending on speed and angle.
gravity.video.mp4
git clone https://github.com/shayaanthedev/Gravity-Slingshot-Simulation.git
cd Gravity-Slingshot-Simulation
pip install pygame
python main.pyGo to the Releases section
Download the latest version
Extract the files
Run the executable
If you like this project, consider giving it a star ⭐
Contributions are welcome.
fork → edit → pull request