Inside view of a single extremally charged black hole with gravitational lensing of the event horizon
The Majumdar-Papapetrou solution to the Einstein-Maxwell equations describes extremally charged black holes where mass equals charge (M=∣Q∣) in natural units. This program depicts the intrinsic view of an observer near one such black hole, computed by tracing light along null geodesics of the metric ds2=−U−2dt2+U2(dx2+dy2+dz2) with U=1+M/r. Pixels are colored red if the geodesic from the observer’s eye in that direction enters the black hole’s event horizon.
The raytracing is performed per-pixel in a GLSL fragment shader, solving the geodesic ODE at each step. Controls: WASD to rotate, arrow keys to translate.