https://github.com/kuranez/solar-system-simulation-web
Web version of Solar System Sim using Panel and Pygame.
https://github.com/kuranez/solar-system-simulation-web
animation astronomy holoviz-panel physics pygame python simulation solar-system-simulation webapp
Last synced: 18 days ago
JSON representation
Web version of Solar System Sim using Panel and Pygame.
- Host: GitHub
- URL: https://github.com/kuranez/solar-system-simulation-web
- Owner: kuranez
- Created: 2026-05-22T11:12:58.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2026-05-30T07:35:29.000Z (26 days ago)
- Last Synced: 2026-05-30T08:07:08.372Z (26 days ago)
- Topics: animation, astronomy, holoviz-panel, physics, pygame, python, simulation, solar-system-simulation, webapp
- Language: Python
- Homepage: https://apps.kuracodez.space/solar-system-sim/app
- Size: 257 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Solar System Simulation Web
Web implementation of my previous [Solar System Simulation](https://github.com/kuranez/solar-system-simulation) with simplified functionality for web rendering.
---
## 🌐 WebApp
> [](https://apps.kuracodez.space/solar-system-sim/app)
>
> **Try the app - explore the solar system directly in your browser.**
>
---
## 💡 Features
- **Interactive Simulation Controls:** Play, pause, and advance the simulation frame-by-frame.
- **Multiple Simulation Views:** Easily switch between different scenarios, such as the full solar system or a simple Sun-Earth system.
- **Web App built using Panel:** The entire user interface is built with the powerful and flexible Panel library.
- **Off-Screen Pygame Rendering:** Utilizes Pygame for high-performance, off-screen rendering of the simulation, served through the Panel web interface.
---
## ⚙️ Project Architecture
```yaml
solar-system-simulation-web/
│
├── app.py # Main application entry point. Initializes Panel UI, state, and callbacks.
├── constants.py # Central file for simulation constants (physics, colors, scaling).
├── modules/ # Simulation presets and helper generators
│ ├── simple_solar_system.py
│ ├── simple_sun_and_earth.py
│ ├── simple_sun_earth_moon.py
│ └── simple_earth_moon.py
├── objects/ # Runtime body definitions and presets
│ ├── base.py
│ ├── planet.py
│ ├── moon.py
│ ├── asteroid.py
│ └── presets/
├── ui/ # UI components and rendering helpers
│ ├── css.py
│ ├── canvas.py
│ ├── hud.py
│ ├── screen.py
│ └── ui_handlers.py
├── simulation/ # Core simulation engine and scaling utilities
│ ├── physicss.py
│ └── scale.py
├── requirements.txt
└── README.md
```
---
## 📦 Dependencies
- **`pygame`**: For off-screen rendering of the simulation.
- **`panel`**: For building the web interface and serving the application.
- **`numpy` & `math`**: For numerical operations, particularly in converting Pygame surfaces.
- **`Pillow`**: For image processing and handling the PNG conversion.
---
## 📕 Resources
[Planetary Data from NASA](https://nssdc.gsfc.nasa.gov/planetary/factsheet/)
---
## 📗 Contributing
Pull requests, bug reports, and feature requests are welcome!
---
## 📘 License
This project is open source and available under the MIT License. You may modify, distribute, and use it freely in your own projects.