I attempted to build a real-time null geodesic integrator for visualizing photon paths around a non-rotating black hole. The implementation compiles to WebAssembly for browser execution with WebGL rendering.

Technical approach:

- Hamiltonian formulation of geodesic equations in Schwarzschild spacetime

- 4th-order Runge-Kutta integration with proximity-based adaptive stepping

- Analytical metric derivatives (no finite differencing)

- Constraint stabilization to maintain H=0 along null geodesics

- LRU cache for computed trajectories

The visualization shows how light bends around the event horizon (r=2M) and photon sphere (r=3M). Multiple color modes display termination status, gravitational redshift, constr...

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help