Skip to main content
Physics

Lens Simulation: Ray Tracing, Mirrors & Focus

Slide a candle along a lens bench. Where does its image form, and what does it look like?

Thin lenses and spherical mirrors obey 1/f = 1/d_o + 1/d_i and magnification m = -d_i / d_o, producing inverted real images when an object sits outside a converging lens's focal point and upright magnified virtual images inside it. In this interactive 3D lens simulation, students slide a candle, lenses, mirrors, and screen along an optical bench, verify principal rays, and locate virtual images by parallax.

  • 11 languages
  • Laptop · tablet · phone
  • Members

Create a free account to get 2 lifetime Free Lab Passes for any labs in the library. The course guide on this page stays free.

Inside this lab

  1. 1

    Preview

    • Driving question
    • What you will predict
    • Equipment and safety
  2. 2

    Lab

    • Lock in prediction
    • Run the experiment, measure and replay
    • Your notebook fills in as you go
  3. 3

    Check

    • Did the lab agree with you?
    • Claim, evidence, reasoning
    • Check questions and a printable lab report

How this lens simulation connects principal rays to 1/f = 1/d_o + 1/d_i

Tracing parallel, central, and focal rays along a 3D optical bench shows how every point on a glowing candle maps to a sharp focused point on a screen—or to an upright virtual image behind the optic when d_o < f. Recording d_o, d_i, and image height h_i across multiple positions directly verifies both the thin-lens equation and the magnification ratio m = h_i / h_o = -d_i / d_o.

Apparatus, safety notes, and step-by-step procedure

  • Apparatus: 3D graduated optical bench (cm), luminous candle/arrow object, interchangeable converging (f = +20 cm reference) and diverging lenses, concave and convex mirrors, movable viewing screen, half-lens aperture card, ray-trace overlay, and parallax marker for virtual images.
  • Safety note (for physical lab prep): In a classroom optics lab, never aim a converging lens or concave mirror at the Sun, handle glass optics by their edges, and keep paper screens away from open candle flames.
  1. Open the 3D optical bench in Ideal mode with the converging lens (f = +20 cm) and place the candle at d_o = 40.0 cm (2f).
  2. Slide the screen along the bench until the inverted candle image snaps into crisp focus; record d_i (40.0 cm) and measure image height h_i to confirm magnification m = -1.00.
  3. Move the candle farther away (d_o = 60.0 cm, beyond 2f), refocus the screen, and confirm the real image forms closer (30.0 cm), inverted, and reduced (m = -0.50).
  4. Move the candle between f and 2f (d_o = 30.0 cm), refocus the screen, and confirm the real image forms farther (60.0 cm), inverted, and magnified (m = -2.00).
  5. Plot 1 / d_i against 1 / d_o for at least 5 real-image trials and read the intercept 1 / f to determine experimental focal length f.
  6. With a sharp real image on the screen, cover half the lens with the aperture card and verify that the entire image remains intact at lower brightness.
  7. Move the candle inside the focal point (d_o = 12.0 cm < f), confirm no image focuses on the screen, and use the virtual-image parallax marker to locate the upright magnified virtual image.
  8. Swap to a diverging lens or concave mirror and repeat principal-ray comparisons to confirm sign conventions.

Recording table and model reference data

Model reference data — run your own trials in the 3D lab. Values below reflect Ideal thin-lens geometry for a converging lens with focal length f = +20.0 cm.

TrialIndependent Variable (Object Distance d_o, f = +20 cm)Dependent Variable (Image Distance d_i & Magnification m)UnitsObservation
Ref 1d_o = 40.0 cm (2f)d_i = +40.0 cm, m = -1.00cm, ratioReal, inverted, exact same size as object
Ref 2d_o = 60.0 cm (> 2f)d_i = +30.0 cm, m = -0.50cm, ratioReal, inverted, half-size image between f and 2f
Ref 3d_o = 30.0 cm (f < d_o < 2f)d_i = +60.0 cm, m = -2.00cm, ratioReal, inverted, doubled image beyond 2f
Your TrialRecord optic type, f, d_o, h_oRecord d_i, h_i, m = h_i / h_o, image typecm, ratioKeep + / - sign conventions for virtual images and diverging optics

Lab report outline (blank template)

  1. Title: Specify the optical elements tested (converging lens, diverging lens, or spherical mirrors).
  2. Purpose: Define how screen and parallax measurements verify 1/f = 1/d_o + 1/d_i and m = -d_i / d_o.
  3. Hypothesis: Predict image type (real/virtual), orientation, and size across the three distance zones (> 2f, f..2f, < f).
  4. Variables: List object distance d_o and optic type (independent); d_i, h_i, and m (dependent); focal length f and object height h_o (controlled).
  5. Data Table: Log d_o (cm), d_i (cm), 1/d_o (cm^-1), 1/d_i (cm^-1), h_i (cm), and m.
  6. Analysis & Calculation: Graph 1/d_i vs. 1/d_o (slope -1, intercepts 1/f), compute f from each trial, and compare h_i / h_o with -d_i / d_o.
  7. Conclusion & Sources of Error: Explain why blocking half a lens dims rather than crops the image, and analyze how Real-mode depth-of-focus uncertainty, thick-lens offsets, or spherical aberration shift measured f.

Continue exploring optics and light

Test Snell's law boundary bending in Refraction & Snell's Law, explore wave diffraction in Light Interference & Diffraction, or browse Light & Optics Labs.

Common questions

How does the thin-lens equation predict image distance and magnification?

Use 1/f = 1/d_o + 1/d_i to solve for image distance d_i from object distance d_o and focal length f, then compute magnification m = -d_i / d_o (negative m means an inverted real image).

What happens when an object sits at twice the focal length (d_o = 2f) of a converging lens?

For a converging lens of focal length +20 cm with an object at 40 cm, the real image forms at exactly d_i = 40 cm on the opposite side with magnification m = -1 (same size, inverted).

What happens if you block half of a converging lens with a card?

The entire image still appears in the exact same position, only dimmer—because light rays from every point on the object pass through every unblocked part of the lens to reach the image.

How do real images differ from virtual images on an optical bench?

Real images are formed by actually converging light rays and can be focused sharply onto a movable screen; virtual images appear where diverging rays trace backward and must be located by eye/parallax.

Why does a diverging lens always produce a smaller, upright virtual image?

A diverging lens has a negative focal length f < 0, so for any real object d_o > 0, the thin-lens equation always yields negative d_i (same side as object) and positive magnification 0 < m < 1.

How do converging mirrors compare with converging lenses?

Concave mirrors focus parallel light by reflection on the same side as the object, yet they obey the exact same mirror equation 1/f = 1/d_o + 1/d_i with the standard sign conventions.