Play n Tools

Free tools & games for everyone

Free · No sign-up · No accounts

Gravitational lens simulator

See how mass bends light: move a galaxy behind a star, a planet or a cluster and watch arcs, double images and Einstein rings appear. With light curves.

 

How to use

  1. Choose a lens (the mass in front) and a background source (the galaxy behind it).
  2. Move the source with the sliders, or click the picture to put the true source position there. The small cross marks where the source really is.
  3. Line it up behind the lens and watch the arcs join into an Einstein ring. Move it off centre to see two images, one bright and one faint.
  4. Switch the lens off to see the source as it really looks.
  5. The other tabs draw the light curve of a microlensing event and work out the size of the Einstein ring for a mass and two distances.

Keyboard and touch

TabMove between tabs, lists, sliders and boxes
Arrow keys on a sliderMove the source a little or change its size
Click or tap the picturePut the source there
Enter in a boxWork it out

Tips

  • A point lens always makes two images: one outside the Einstein ring on the source's side and one inside it on the far side.
  • The lens never makes the source look dimmer in total. It bends extra light towards us, so the total brightening is always more than 1.
  • With two stars or a planet the picture gets extra images and sharp bright arcs (caustics). Astronomers find planets by spotting a short blip on a microlensing light curve.
  • The chequered square shows how the lens stretches shapes along the ring and squeezes them across it.
  • The Sun bends starlight too: a star seen right at the Sun's edge is shifted by about 1.75 arcseconds, the measurement of 1919 that made Einstein famous.

About this simulator

General relativity says light passing a mass M at distance b is bent by the angle 4GM / (c² b). For thin lenses made of point masses this gives the lens equation β = θ − Σ mi (θ − θi) / |θ − θi|², with all angles in units of the Einstein radius θE = √(4GM / c² · DLS / (DL DS)). The picture is drawn by ray shooting: for each of 300 × 300 pixels we follow the ray back to the source plane and read the source's brightness there. Surface brightness is kept by lensing, so the brightening is the ratio of light in the picture with and without the lens (pixel by pixel, so a little rough for tiny sources).

For one point lens the images are at (u ± √(u² + 4)) / 2 Einstein radii for a source u Einstein radii from the lens, and the total brightening is (u² + 2) / (u √(u² + 4)). As the stars move, u changes with time and the light curve rises and falls; the Einstein time is the time to cross one Einstein radius. Constants: GM of the Sun 1.3271244 × 1020 m³/s², the speed of light and the IAU parsec. Real lenses are galaxies with spread-out mass; this is a teaching model. Everything runs in your browser.

See you tomorrow!

A fresh daily puzzle every morning, and new tools added every month.

Browse every product