PhysSandbox
Classical MechanicsWaves & SoundElectricity & MagnetismOptics & LightGravity & OrbitsLabs
🌙Astronomy & The Sky🌡️Thermodynamics🌍Biophysics, Fluids & Geoscience📐Math Visualization🔧Engineering🧪Chemistry

More from Gravity & Orbits

Other simulators in this category — or see all 27.

View category →
NewUniversity / research

Lagrange Points L1–L5

CRTBP effective potential; L1–L5; Coriolis test particle.

Launch Simulator
NewSchool

Earth–Moon Tides

Equilibrium tide bulges; orbit speed; ~12.4 h spacing note.

Launch Simulator
NewSchool

Binary Star (circular)

COM orbits; r₁,r₂; Kepler T² ∝ a³/(M₁+M₂).

Launch Simulator
NewUniversity / research

Roche Limit

Fluid d ≈ 2.456 R_p (ρ_p/ρ_s)^(1/3); vs orbit distance.

Launch Simulator
NewSchool

Space Elevator Tether

1D tension vs height; peak near GEO (normalized model).

Launch Simulator
NewSchool

Hohmann Transfer

Coplanar circles r₁,r₂; transfer ellipse; Δv₁, Δv₂ from vis-viva.

Launch Simulator
PhysSandbox

Interactive physics, chemistry, and engineering simulators for students, teachers, and curious minds.

Physics

  • Classical Mechanics
  • Waves & Sound
  • Electricity & Magnetism

Science

  • Optics & Light
  • Gravity & Orbits
  • Astronomy & The Sky

More

  • Thermodynamics
  • Biophysics, Fluids & Geoscience
  • Math Visualization
  • Engineering
  • Chemistry

© 2026 PhysSandbox. Free interactive science simulators.

PrivacyTermsContact
Home/Gravity & Orbits/Gravitational Lensing

Gravitational Lensing

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

Lens

72 px
18 px
36 px
1.8
14 px

Measured values

θ_E (model)72 px
Ring at |θ| ≈ θ_Eon

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.