Shadow and Light: Simulating Galactic Core Lensing
Ayush Mondal
An interactive astrophysics simulator that lets you alter gravitational and spacetime parameters in real time to observe their direct effect on star S301's orbit around Sagittarius A*.

What it does
A GPU-accelerated, real-time renderer that simulates the appearance and physics of Sagittarius A*, the supermassive black hole at the center of the Milky Way, complete with gravitational lensing, an orbiting star (S2/S301-class), a real starry sky, and interactive relativistic physics controls.
Built with Taichi for cross-platform GPU compute (Vulkan / OpenGL / CPU), the simulator runs a full ray-marcher per pixel that bends light around a spinning (Kerr) black hole, renders a volumetric accretion disk, and integrates a real orbital-mechanics model side-by-side in the same 3D scene — all interactively, at real-time frame rates.
✨ Highlights
Physically-motivated Kerr black hole: horizon and ISCO radii computed from the Kerr metric, reduced-order gravitational lensing, relativistic Doppler beaming, and frame-dragging (Lense–Thirring precession).
Real astrophysical scale: mass is calibrated to Sagittarius A*'s measured mass of 4.154 × 10⁶ M☉, with full unit conversion between geometric (G = c = 1) render units and physical units (km, seconds, solar masses).
Independent orbital-mechanics lab: a test-particle integrator (RK4 + 1PN relativistic precession) simulates a star (modeled on the S2/S0-2-class "S301" orbit: a = 687 AU, e = 0.983, P ≈ 8.69 yr) around the black hole in its own physical unit system, then projects it into the render scene — so what you see orbiting the hole is a real, independently-verified Keplerian/relativistic solution, not a scripted animation.
Volumetric, procedural accretion disk: animated turbulent plasma filaments (fBm noise), Doppler-shifted color and brightness, and a photon-ring brightness boost near the shadow edge. Real sky: an equirectangular Milky Way image is used as the skybox background (tiltable relative to the black hole's spin axis), overlaid with real stars from the Yale Bright Star Catalogue (BSC5) at their true J2000 coordinates, colored by their actual B–V color index / blackbody temperature, and gravitationally lensed by the same ray-marcher as everything else in the scene. Cinematic render pipeline: adaptive-step ray marching, bilinear upscaling from a lower internal compute resolution for performance, a separable bright-pass + blur bloom pass, and ACES filmic tone mapping for an HDR, cinema-grade look.
Fully interactive GUI: live sliders/buttons for spin, exposure, render quality, camera, color palette, Milky Way appearance, and the orbital lab (spawn test particles, toggle GR precession, compare orbits).
Multi-backend support: runs on Vulkan, OpenGL, or pure CPU, so it works across discrete GPUs, integrated GPUs (e.g. Intel Iris Xe/UHD), and machines with no GPU at all.
🔭 Why This Project
Most "black hole visualizers" are either pure Hollywood-style shaders with no real physics, or offline scientific ray-tracers (like the tools used for Interstellar) that take minutes per frame and aren't interactive. This project sits in between: it keeps genuine general-relativistic quantities (horizon, ISCO, spin-dependent lensing, frame dragging, relativistic precession) driving what's on screen, while still rendering interactively on consumer and integrated GPUs — turning a normally research-grade or VFX-grade problem into something anyone can explore live with a mouse and a slider.
📜 Credits & Data Sources
Star positions/magnitudes/colors: Yale Bright Star Catalogue (BSC5), Hoffleit & Warren (1991) Physical constants: CODATA / IAU standard values (G, c, M☉) Sgr A* mass: adopted value of 4.154 × 10⁶ M☉ from published measurements of the Galactic Center