Render a stylized Dyson ring as a rotating wireframe with flickering starfield backdrop. The camera uses an orthographic projection so the ring keeps its scale while you yaw, pitch, and let it spin.
- Python 3.10+ (tested with 3.14)
pygame(2.6.x) with SDL runtimenumpy
Install the Python deps with pip:
python -m pip install pygame numpyIf you use a virtual environment:
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\\Scripts\\activate
python -m pip install pygame numpyFrom the repo root:
python main.pyThis opens a window, animates the ring, and displays HUD text with the current Euler angles for pitch, yaw, and spin.
- Tesselates a ring into beveled curved box segments, seeds each face with randomized red city lights, and rotates everything in 3D.
- Projects with an orthographic camera, painter-sorts faces, draws edges in neon green, and overlays a glowing central star.
- Generates a saturated, twinkling background starfield for atmosphere.
- Drag left mouse button: yaw and pitch the view.
ESC: quit.
- The HUD uses
pygame.font.SysFont. If the requested typeface is missing, Pygame falls back to an available system font automatically. - On macOS you may need to allow the SDL window to receive input if prompted.