This project simulates the orbits of terrestrial planets around the Sun using Python and Pygame. It demonstrates the distances of the planets from the Sun and their orbital paths. Additionally, it includes a scenario where the Sun is replaced by a black hole of the same mass, proving that the orbits of the planets remain unchanged.
- Realistic simulation of the orbits of terrestrial planets.
- Visualization of the distances of planets from the Sun.
- Normal simulation with the Sun.
- Simulation with the Sun replaced by a black hole of solar mass.
Solar.System.Simulator.2024-07-02.10-43-33.mp4
Solar.System.Simulator.2024-07-02.10-42-59.mp4
-
Clone the repository:
git clone https://github.com/Abhishek-465/Solar-Simulation.git cd Solar-Simulation
-
Install the required dependencies:
pip install -r requirements.txt
-
Run the simulation:
python solar_system.py
The replacement of the Sun with a black hole of the same mass does not change the gravitational environment of the solar system. The planets continue to orbit as they did before because the gravitational force acting on them remains unchanged.
This concept is an illustration of how gravity works and highlights the fact that the source of gravitational force (whether it’s a star or a black hole) affects objects in the same way as long as the mass and distance remain constant.
Contributions are welcome! Please feel free to submit a Pull Request.
For any questions or feedback, please contact Abhishek-465.