This is a planet simulation program using the Python programming language and the Pygame library. It simulates the motion of planets in a simple solar system based on gravitational forces.
- Simulates the motion of planets around a central star.
- Displays the planets' orbits and positions in real-time.
- Utilizes the Pygame library for graphics and visualization.
- Install Python if you don't have it installed.
- Install the Pygame library using the command:
pip install pygame. - Clone this repository:
git clone https://github.com/yourusername/planet-simulation.git. - Navigate to the project folder:
cd planet-simulation. - Run the simulation:
python main.py.
- Press the 'X' button to close the simulation window.
- Observe the motion of planets and their orbits.
Contributions are welcome! If you'd like to contribute to this project, please follow these steps:
- Fork this repository.
- Create a new branch:
git checkout -b feature/new-feature. - Make your changes and commit them:
git commit -m 'Add new feature'. - Push to the branch:
git push origin feature/new-feature. - Open a pull request and describe your changes.