The Physics of the Universe
Home › Simulations › Ray Optics Simulator (Thin Lenses & Spherical Mirrors)

Ray Optics Simulator (Thin Lenses & Spherical Mirrors)

Drag an optical object in front of converging/diverging thin lenses or concave/convex mirrors—watching three principal rays refract or reflect at the principal plane, form inverted real images or dashed virtual images, and obey 1/f = 1/d_o + 1/d_i.

Presets:
Drag the glowing object tip left or right past F and 2F, or switch presets between Real Image, Magnifier Virtual Image, and Concave Mirror.

Key Equations & Physics Model

Thin Lens / Mirror Formula (Real-is-Positive): 1 / f = 1 / d_o + 1 / d_i
Lateral Magnification: M = h_i / h_o = −d_i / d_o
Sign Convention: f > 0 converging/concave; d_i > 0 real (inverted); d_i < 0 virtual (upright)

Rays bend strictly at the central principal plane (thin-element limit). Placing d_o = f sets 1/d_i = 0 cleanly so exiting rays run parallel to form an image at infinity.

How the Physics Works

Every rotationally symmetric thin lens or spherical mirror can be solved graphically with principal rays hitting its central principal plane: a ray parallel to the axis bends toward (or away from) focus F, while a center ray passes essentially undeviated.

Under the standard real-is-positive sign convention, converged outgoing rays produce a real, inverted image on a physical screen (d_i > 0), whereas diverging rays extrapolated backward as dashed lines trace an upright virtual image (d_i < 0) visible inside a magnifying glass or convex mirror.

Image Formation Zones for a Converging Lens (f > 0)

Object PlacementImage Distance d_iReal or Virtual?Orientation & Size
Beyond 2F (d_o > 2f)f < d_i < 2fRealInverted, diminished (camera lens)
At 2F (d_o = 2f)d_i = 2fRealInverted, exact 1× size (M = −1)
Between F and 2Fd_i > 2fRealInverted, magnified (projector)
At Focus (d_o = f)d_i = ∞Collimated beamParallel outgoing rays (lighthouse)
Inside Focus (d_o < f)d_i < 0 (same side)VirtualUpright, magnified (magnifying glass)

How do lenses and mirrors flip, magnify, or create virtual images?

A 38-second animation: thin lens equation 1/f = 1/do + 1/di, real vs virtual rays, and collimation at d_o = f.

Experiments to Try

Check Exact 1:1 Image at 2F

Set Converging Lens with |f| = 2.0 m and d_o = 4.0 m: image lands at d_i = 4.00 m with M = −1.00×.

Place Object Exactly at Focus

Set d_o = |f| = 2.2 m on a converging lens: HUD reports d_i = ∞ because refracted rays exit strictly parallel.

Verify Magnifying Glass Virtual Rays

Select Magnifying Glass (d_o < F): dashed virtual rays converge behind the object to form an enlarged upright virtual image.

Frequently Asked Questions

What happens to half the image if you cover half of a converging lens?

The full image still forms because every point on the object sends light through all halves of the lens; only image brightness drops by half.

Can a single diverging lens or convex mirror ever make a real image of a real object?

No—for d_o > 0 and f < 0, 1/d_i = 1/f − 1/d_o is always negative, guaranteeing d_i < 0 (always virtual, upright, and smaller).

Related Topics & Tools