Gravitational lensing demonstrates how mass warps spacetime, causing the paths of light rays from distant sources to curve as they pass a massive foreground object. This simulator visualizes this effect by modeling the foreground mass as a point mass, applying the principles of general relativity in a simplified, weak-field approximation. The core physics is governed by the deflection angle, α, given by α = (4GM)/(c²b), where G is the gravitational constant, M is the lens mass, c is the speed of light, and b is the impact parameter—the closest distance the light ray would have passed the mass if undeflected. The simulator traces light rays from a background source, calculating their bent trajectories to produce distorted, magnified, or multiple images of the source. Key observable phenomena modeled include Einstein rings, where a perfectly aligned source and lens create a circular image, and multiple-image formation for near-perfect alignments. Simplifications include treating the lens as a singular, static point mass, ignoring the complex structure of real galaxies or clusters, and using a two-dimensional projection of the celestial sphere. By manipulating parameters like lens mass, source position, and background galaxy shape, students learn how gravity acts on light, explore the relationship between impact parameter and deflection strength, and directly see how warped spacetime translates into dramatic astronomical observations used to map dark matter and measure cosmic distances.
Who it's for: Advanced high school and undergraduate physics/astronomy students studying general relativity, astrophysics, or modern optics, as well as educators seeking a visual tool for these abstract concepts.
Key terms
General Relativity
Spacetime Curvature
Deflection Angle
Einstein Ring
Impact Parameter
Gravitational Lens
Weak Gravitational Lensing
Strong Gravitational Lensing
How it works
A toy point-mass gravitational lens in the thin-lens / weak-field picture. In the image plane, θ is the angular offset from the lens; in the source plane, β = θ (1 − θ_E² / |θ|²) (with softening ε). That is the same structure that produces an Einstein ring when a source lies exactly behind the lens: images pile up near |θ| = θ_E. The background grid lives in the source plane; what you see is how it would appear after lensing. Not a full ray-traced metric — a clear, fast 2D mapping for intuition.
Key equations
β = θ (1 − θ_E² / (|θ|² + ε²))
Einstein ring: |θ| ≈ θ_E when source is on axis behind lens
Frequently asked questions
Does this mean gravity is pulling on light? I thought photons were massless.
In Newtonian gravity, which depends on mass, light would not be affected. General relativity provides the correct explanation: mass and energy warp the fabric of spacetime itself. Light, traveling along the straightest possible paths (geodesics) in this curved spacetime, follows a bent trajectory. The effect is not a 'pull' but a consequence of moving through warped geometry.
Why do we sometimes see multiple images of the same distant quasar or galaxy?
Multiple images form when the background source, the massive lens, and the observer are nearly perfectly aligned. Light rays from the single source can take different paths around the lens, each bending by a different amount, before converging at the observer. The simulator shows how these distinct paths create two, four, or even a full Einstein ring image of the same object.
Is the image distortion in the simulator exaggerated?
For a single stellar-mass object, the deflection is tiny (arcseconds). The simulator often uses scaled-up masses or alignments to make the lensing effects clearly visible on screen. In reality, the most dramatic effects—like giant arcs and multiple images—are caused by enormous masses, such as entire galaxy clusters, where the distortions are significant but still follow the same physical principles modeled here.
How is gravitational lensing actually used by astronomers?
It is a powerful cosmic tool. Strong lensing reveals the properties of distant galaxies and quasars. Weak lensing, which statistically measures tiny distortions of many background galaxies, is used to map the distribution of dark matter in galaxy clusters. It also acts as a natural telescope, magnifying extremely distant objects we could not otherwise see.