This is a physics simulator to show the physics that works around a back hole in as much detail as possible. Developed with inspiration from youtube tutorials.
-
You can choose between two modes: interstellar and custom
-
in interstellar, mode u will see a fixed size black hole.
-
in cutom mode, u can change the mass of the black hole and metres per pixel of the simulation from settings
-
in both the modes, you can generate light rays in ur desired directions
-
there is interstellar background music playing in the background.
-
overall a cool experience too see how light will be effected near a black hole.
Screencast.From.2025-10-25.21-50-17.mp4
To run this locally, you will need python3 and these libraries:
-
pygame
-
pygame_gui
you can install them using this command:
pip install pygame pygame_gui
- Clone the repository:
git clone https://github.com/Turbash/fall
cd fall
-
Download the iamges and mp3 file from github and place them in the same directory as the source code.
-
Run the simulation python file:
python3 black_hole.py
To play the simulation it is really simple u can choose between two modes, one is interstellar mode, which is really just fixed constants for u a black hole is already there and u have can create rays by using ur mouse clicks. And there is custom mode where u can make ur black hole with custom mass and also change the meteres per pixel of the overall simulation using the settings menu. If u want to go to previous menu from any mode or settings press Esc key on you keyboard. That is all for now.