A simple interactive solar system visualization built with Python and Pygame.
It renders:
- A sun at the center of the world
- Multiple planets orbiting the sun
- Orbit rings for each planet
- A starfield background with slower camera movement for a parallax effect
- Real-time orbit animation
- Camera movement with WASD
- Mouse-wheel zoom in and out
- Zoom-aware planet distances and orbit circles
- src/system.py: Main loop, input handling, camera, rendering order
- src/planet.py: Planet orbit math and drawing
- src/star.py: Background star rendering
- Python 3.9+
- pygame
- Create a virtual environment (optional but recommended): python -m venv venv
- Activate it: Windows PowerShell: .\venv\Scripts\Activate.ps1
- Install dependencies: pip install pygame
Run From the Solar-system-model folder: python src/system.py
- W: Move camera up
- A: Move camera left
- S: Move camera down
- D: Move camera right
- Mouse wheel up: Zoom in
- Mouse wheel down: Zoom out
- Close window: Exit simulation
- Zoom is clamped to a min and max range to keep rendering stable.
- Stars use a slower camera offset than planets/sun to create depth.
