Raymarching through a wormhole connecting two Euclidean spaces, with $S^2 \times \mathbb{R}$ throat geometry
This program renders the view through a wormhole connecting two copies of Euclidean 3-space. The Riemannian metric transitions smoothly from S2xE (product of a 2-sphere and a line) near the wormhole throat to flat Euclidean space in the asymptotic regions, and geodesics are computed via RK4 integration of the resulting geodesic ODE. An earth-textured sphere and moon orbit in one copy while different objects populate the other, and rays that pass through the wormhole mouth emerge on the other side with the geometry bending light around the throat.
Controls: WASD to rotate, arrow keys to translate.