▲ 34 r/blackholes
Real-Time ray-traced black-hole simulation in python (Schwarzschild's metric)
I wrote multiple black hole simulations in Python (and one in Rust), this one uses computation of photons' geodesic in their respective orbital plane (because I solve in Schwarzschild's metric) and caching deviation of photons in the VRAM of the GPU (I used Cupy for shader for GPU computation).
I initially wrote the code by hand and then used a bit of ai to optimize the code trying to squeeze as much FPS as possible and ended up with ~100fps in 720p (with my 1660Ti)
The code at : https://github.com/ArnaudLelievre48/ray-traced-black-hole
u/nobody48sheldor — 5 days ago