Gravitational Lensing Simulator

Interactive simulation of gravitational lensing: drag a massive object to bend spacetime and observe Einstein rings, multiple images, and arc distortions

Gravitational Lensing View

Gravitational Lensing

Einstein's General Theory of Relativity predicts that massive objects curve spacetime around them. When light from a distant source passes near a massive foreground object, its path is bent by that curvature. This simulator uses a strong-lensing toy model with an elliptical lens potential plus external shear, which is the minimal extension needed to reproduce realistic four-image configurations. The deflection field still scales with the Einstein radius theta_E, while ellipticity stretches the critical curve and shear tilts the image geometry. The main observable effects remain the same: multiple images, magnification, and tangential arc distortion.

Einstein Ring and Cross

When source, lens, and observer are perfectly aligned, the source appears as a complete Einstein ring with angular scale theta_E. When the alignment is slightly off, the ring breaks into bright arcs. If the lens is not perfectly circular and the source lies inside the diamond-shaped caustic created by ellipticity and external shear, four images can form in a cross pattern: the Einstein Cross. Moving the lens changes the source offset beta, while ellipticity and shear control whether the system prefers two images, four images, or a nearly closed ring.

Applications

Dark matter mapping: gravitational lensing bends light regardless of whether the lens is visible or dark, making it the most direct probe of dark matter distribution. Weak lensing surveys (DES, KiDS, Euclid) measure tiny coherent distortions across millions of galaxies to map large-scale structure. Strong lensing by galaxy clusters produces dramatic arcs and multiple images, revealing cluster mass profiles. Exoplanet detection: microlensing occurs when a foreground star passes in front of a background star, temporarily magnifying it. If the foreground star has a planet, the light curve shows a brief extra bump — over 200 exoplanets found this way. Cosmology: time delays between multiple images (e.g., H0LiCOW project) measure the Hubble constant H₀ independently. Galaxy evolution: lensing magnification acts as a natural telescope, enabling observations of otherwise too-faint galaxies in the early universe (e.g., JWST leveraging cluster lenses). Testing gravity: comparing lensing mass with X-ray/dynamical mass tests GR on galactic scales.

How to Use

The canvas shows a background source plane distorted by the gravitational lens. Drag the yellow lens to change the source offset and watch the image configuration update. Adjust Lens Mass to change the Einstein radius and overall bending strength. Source Distance rescales the effective lensing strength. Start with Perfect Alignment to get a near-complete ring, then try Slight Offset to split it into arcs. Giant Arc increases the lens strength and asymmetry for dramatic stretching. Einstein Cross uses stronger ellipticity and shear so the centered source sits inside the four-image caustic. Toggle Background Grid to inspect the warped mapping, Source Galaxy to render the lensed source, Light Rays to show stylized image-to-source paths, and Einstein Ring to overlay the reference critical scale.