General Relativity & Astrophysics

Gravitational Lensing

Simulate photon null geodesics around a Schwarzschild Black Hole. Observe gravitational light deflection α = 4GM/c²b, photon sphere orbit capture at r = 1.5 r_s, and Einstein ring formation.

Deflection Angle α 32.4°
Impact Parameter b 3.2 r_s
Photon Sphere r_ph 1.50 r_s

Black Hole Parameters

Visual Overlay

Controls

Schwarzschild Null Geodesic Equation

Effective Potential: V(r) = (1 - r_s / r) · (L² / r²)
Deflection Angle: α ≈ 4GM / (c² b) = 2 r_s / b
Critical Photon Sphere Capture: b_critical = (3√3 / 2) · r_s ≈ 2.598 r_s
Developer Reference

Core Algorithm & Standalone Script

// Schwarzschild general relativity ray tracing engine
const canvas = document.getElementById('canvas');
const ctx = canvas.getContext('2d');
// d2u/dphi2 + u = 3/2 * r_s * u^2