Gravitational Lensing
Gravity bends spacetime, and light follows the curves. A massive object — a galaxy, a black hole, a cluster of dark matter — warps the geometry of space around it, deflecting light from more distant sources. The result: Einstein rings, multiple images, and magnified views of the distant universe. Drag the lens around to see how alignment affects what an observer sees. The cosmos has its own telescopes, and they are made of gravity.
Gravity Bends Light
Einstein’s general theory of relativity tells us that mass curves spacetime,
and that light follows geodesics — the straightest possible paths through curved
geometry. When light from a distant source passes near a massive object, it follows
the curved spacetime and arrives at the observer from a different direction than it
would without the lens. The deflection angle for a point mass is
α = 4GM/(c²ξ), where ξ is the closest approach distance.
This was first confirmed during the 1919 solar eclipse, when Arthur Eddington measured
the bending of starlight around the Sun.
Einstein Rings
When the source, lens, and observer are perfectly aligned, the light is deflected symmetrically from all directions, forming a perfect ring around the lens — an Einstein ring. The radius of this ring depends on the mass of the lens and the distances involved. In practice, perfect alignment is rare, so most observed lensing produces arcs rather than complete rings. But when alignment is close, the arcs can extend most of the way around, producing some of the most beautiful images in astronomy.
Multiple Images and Magnification
A gravitational lens can produce multiple images of the same background source. For a simple point mass lens, a source that is not perfectly aligned produces exactly two images: one on each side of the lens. The image closer to the lens is demagnified and inverted; the image farther from the lens is magnified. The total magnification can be enormous — galaxy clusters have been observed to magnify background galaxies by factors of 10 to 50, revealing objects that would otherwise be far too faint to detect. This is nature’s telescope.
The Lens Equation
The simulation uses the thin lens approximation, where the deflection happens in a
single plane. The lens equation relates the true source position β to the
observed image position θ: β = θ - α(θ).
For a point mass lens, this becomes a quadratic with two solutions — the two
images. The Einstein radius θE is the special case where β = 0
and the image becomes a ring. This simulation ray-traces light backwards from a grid
of observer pixels through the lens plane to determine where each ray originated in
the source plane, then colors the pixel accordingly.