Skip to content

Latest commit

ย 

History

History
61 lines (34 loc) ยท 2.08 KB

File metadata and controls

61 lines (34 loc) ยท 2.08 KB

๐Ÿช Planet Orbit Simulator

A captivating 2D simulation of planets orbiting a central star, built with Pygame. This project visualizes gravitational forces and orbital mechanics in a simple yet engaging way.

โœจ Features

Realistic Orbital Mechanics: Planets attract each other based on Newton's Law of Universal Gravitation.

Scalable Simulation: Adjust SCALE and TIMESTEP to explore different orbital behaviors.

Interactive Visualization: Watch planets trace their paths in real-time.

Distance Tracking: Displays the distance of each planet from the sun (in kilometers).

Customizable Planets: Easily add or modify planets with different masses, radii, and colors.

๐Ÿš€ How to Run

Clone the repository:

git clone https://github.com/Millsjr/Planet-Orbit-Simulator.git cd Planet-Orbit-Simulator

(Note: Replace https://github.com/Millsjr/Planet-Orbit-Simulator.git with your actual repository URL if different, and Planet-Orbit-Simulator with your repository name.)

Install dependencies: This project requires pygame. If you don't have it installed, you can install it using pip:

pip install pygame

Run the simulation:

python your_script_name.py

(Replace your_script_name.py with the actual name of your Python file, e.g., main.py if you save the code as main.py)

๐Ÿ› ๏ธ Built With

Python

Pygame - A set of Python modules designed for writing video games.

๐Ÿ“ธ Screenshots / GIFs

(Consider adding a screenshot or a short GIF of the simulation running here to make your README more engaging!)

Simulation Screenshot

๐Ÿ’ก Future Enhancements

Add more planets (Jupiter, Saturn, etc.).

Implement user controls for zooming or changing simulation speed.

Display additional orbital parameters (e.g., orbital period).

Add collision detection between planets.

Implement a pause/play feature.

๐Ÿ“„ License

This project is open source and available under the MIT License. (Consider creating a LICENSE file in your repository if you haven't already.)

Feel free to explore, contribute, and enjoy the wonders of orbital mechanics!

โšก