Home/Laboratories/Lens Ray Tracing Lab (3D)
3D LABORATORY Interactive experiment — complete Module H · Physical Optics

Lens Ray Tracing Lab (3D)

Only three rays are needed to find where a lens puts an image — and drawing them is a skill your syllabus examines directly. Slide the object along the bench, switch between a converging and a diverging lens, and watch the principal rays rebuild: where they cross you get a real image, where their backward extensions cross you get a virtual one.

Learn the physics first

A thin lens bends every ray that passes through it, but three special rays are enough to locate the image of a point: one parallel to the axis (refracted through the far focus), one straight through the optical centre (undeviated), and one through the near focus (emerging parallel to the axis). Where the three refracted rays meet — or appear to meet — is the image.

Thin lens equation1/do + 1/di = 1/f
Magnificationm = −di/do = hi/ho
Converging / divergingf > 0 / f < 0

Sign convention here: real objects have do > 0; a positive di is a real image on the far side, a negative di is a virtual image on the object side. A negative m means the image is inverted.

Converging lens, do > fReal, inverted image
Converging lens, do < fVirtual, upright, magnified
Diverging lens, any doVirtual, upright, reduced

The object sitting exactly on the focal point is the special case: the outgoing rays are parallel and the image sits at infinity — the operating point of a searchlight or a collimator.

Model assumptions matter. Thin lens, paraxial rays, ideal glass — read all before trusting the numbers.

Experiment — the 3D laboratory

Drag to orbit, scroll or pinch to zoom, right-drag or Shift-drag to pan. Mint arrow: the object. Yellow arrow: the image (translucent and dashed when virtual). Coral lines: the three principal rays, drawn in the plane of the page you would draw on paper.

Preparing the 3D laboratory…
Ready

Straight-line proof: 1/d₀ vs 1/dₐ

The thin lens equation is linear in 1/d — the marker slides along the line.

Optical bench

Lens & object
Camera
Display
Principal rays (3)
Focal points
Image arrow
Labels

Live measurements

thin lens model
Image distance dₐ
— cm
Image height hₐ
— cm
Magnification m
— ×
Image nature
—

A negative dₐ means the image is on the object side (virtual). The 3D view draws the image arrow translucent with a dashed shaft whenever it is virtual.

Analyze — guided investigation

Investigation: predict the image distance

Objective: show that 1/d₀ + 1/dₐ = 1/f predicts where the rays cross — before you look at where they cross.

Recommended settings: convex lens, f = +10 cm. Record trials at d₀ = 30, 20, 15 and 60 cm — then repeat the sequence with the concave lens (enter dₐ as a negative number there, because virtual images live on the object side).

cm

Your prediction is compared with the exact thin-lens value. A negative entry is a perfectly good prediction for a virtual image.

#d₀ (cm)f (cm)Predicted (cm)Actual (cm)Error

Understand — check yourself

Experiment completion

Record a few prediction trials on both lens types, then pass the quiz. Completion is recorded locally when you pass — or mark it manually if you studied it your own way.