u/FraLindiin r/C_Programming • Recommends
Black hole simulation in C
I built a real-time simulation of a supermassive black hole with two orbiting stars, using ray tracing for gravitational lensing effects (Schwarzschild metric). It features OpenGL/GLSL rendering, a deformed spacetime grid, an accretion disk, and interactive camera controls.
Inspired by this YouTube video: [video (done in C++), I reimplemented it in pure C.
Here the source code: https://github.com/mrparsing/C-Projects
2020View on Reddit