OPTICS · High school · College

Thin Lens Simulator

Move an object toward or away from converging and diverging lenses. Watch light rays travel and discover when images are real, inverted, virtual or enlarged.

↓ Jump to simulatorFree · No loginReal-time controlsUnits & models explained
LIVE EXPERIMENTReady · Press Start
Your browser does not support canvas. Read the scientific lesson below.
Press Start to explore the model

Scientific model: Ideal thin-lens, paraxial geometry in a uniform medium; ignores thickness, aberrations, dispersion, diffraction and finite apertures. The drawing is scaled to keep the principal rays visible. Very distant image positions may be marked offstage.

Thin Lens Simulator — static example view
Example view of this experiment. Use the simulator above to explore your selected parameters and live measurements.
LEARNING OUTCOMES

What will you understand?

  • Distinguish real images from virtual images using ray paths.
  • Apply the thin-lens equation with correct distance signs.
  • Relate magnification to image height and orientation.
THE PHYSICS EXPLAINED

How the simulation works

Real versus virtual images

A converging lens may produce a real image on the far side or a virtual image on the same side as the object. A diverging lens with a real object produces an upright, reduced virtual image. Rays actually converge at a real image; dashed backward extensions indicate the apparent source of a virtual image.

What the focal length controls

The thin-lens relationship is 1/f = 1/dₒ + 1/dᵢ. A positive focal length denotes a converging lens and a negative focal length denotes a diverging lens. At dₒ = f for a converging lens, emerging rays are parallel and the ideal image is at infinity.

Magnification and orientation

Transverse magnification m = −dᵢ/dₒ. A negative value indicates an inverted image; a positive value indicates upright orientation. The illustration uses approximate thin-lens paraxial rays.

MODEL EQUATION
1/f = 1/dₒ + 1/dᵢ

Use the controls above to change the relevant parameters. All displayed values follow the assumptions stated on this page.

TRY IT YOURSELF

Three experiments to try

  1. Select a converging lens and put the object beyond twice the focal length. Where is its image?
  2. Bring the object inside the focal length and locate the virtual image by tracing dashed backward extensions.
  3. Switch to a diverging lens and compare image orientation and size.
WORKED EXAMPLE

Calculate it before you visualize it

Take a converging lens with f = 2.0 m and object distance dₒ = 6.0 m. Then 1/dᵢ = 1/2 − 1/6 = 1/3, giving dᵢ = +3.0 m and magnification m = −3/6 = −0.5. The image is real, inverted and half as tall.

QUICK KNOWLEDGE CHECK

Can you predict the result?

A converging lens has f = 2 m. What happens as a real object approaches from dₒ > f to dₒ = f?

Reveal the answer

The real image moves farther away; at dₒ = f the emerging rays become parallel and the ideal image distance tends to infinity.

ASSUMPTIONS & LIMITS

What the model does not show

Ideal thin-lens, paraxial geometry in a uniform medium; ignores thickness, aberrations, dispersion, diffraction and finite apertures. The drawing is scaled to keep the principal rays visible. Very distant image positions may be marked offstage.

REAL-WORLD CONNECTIONS

Where you will encounter this physics

A camera uses a lens to form a real image on a sensor; a magnifying glass can produce a virtual upright image when the object is inside the focal distance. In each case, the same sign-sensitive thin-lens equation explains the difference.

WATCH OUT

Common misconceptions

  • Measuring angles from the wrong reference: object and image distances are measured from the lens plane in this ideal model.
  • Assuming that all lenses produce real images. Diverging lenses normally produce virtual images for real objects.
  • Treating the drawn rays as full-wave optics. Thin-lens diagrams ignore diffraction and aberrations.
CLASSROOM CHALLENGE

Try it with a class

Ask students to measure whether the simulated image height halves when an object is at three focal lengths for a converging lens. Then ask what happens at one focal length and why infinity appears in the formula.

REFERENCES & MODEL REVIEW

Science sources

This teaching implementation follows idealized textbook models. It is designed for exploration and should not be used for engineering design or safety decisions.

OpenStax University Physics Vol. 3 — Thin Lenses ↗

Model implementation: MG Labs teaching model. Independent subject-matter review and classroom testing are still pending.