Geometric Optics - Lenses and Mirrors

Explore how lenses and mirrors form images using ray diagrams

Understanding Lenses and Mirrors

Lenses and mirrors bend or reflect light to form images. Explore the ray diagram below by changing the optical element and moving the object.

The Optical Setup

Choose a with focal length f=f = 15 cm.

Place an object of height ho=h_o = 5 cm at distance do=d_o = 30 cm from the element.

Ray Diagram

FF'dodi

The Thin Lens / Mirror Equation

1f=1do+1di\frac{1}{f} = \frac{1}{d_o} + \frac{1}{d_i}

Solving: di=d_i = 30 cm -- a real image forms on the far side of the element. Drag do=d_o = 30 cm closer to the focal length and watch did_i grow toward infinity.

Magnification

M=−dido=hihoM = -\frac{d_i}{d_o} = \frac{h_i}{h_o}

Currently M=M = -1 and hi=h_i = -5 cm.

The image is real and inverted. Slide the object distance 30 cm toward 2f2f to get ∣M∣=1|M| = 1 (same-size image).

Image Characteristics

Converging Lens (Convex) -- positive ff, can form real or virtual images.

Object beyond the focal point (do>fd_o > f): real, inverted, Same size at Same distance. Move do=d_o = 30 cm inside ff to switch to a virtual magnifying-glass image.

Principal Rays

For lenses, three rays locate the image: a parallel ray that refracts through ff, a central ray through the optical centre (undeviated), and a focal ray through ff that exits parallel. Switch to a to compare how the rays bend.

Explore Further

Drag f=f = 15 cm, do=d_o = 30 cm, and ho=h_o = 5 cm while watching the ray diagram update. Switch between types to see how converging and diverging elements produce fundamentally different images.

Try it in Code

# Thin lens / mirror equation
f = 15             # focal length (cm, positive)
d_o = 30        # object distance (cm)
h_o = 5         # object height (cm)
# For diverging/convex mirror, negate f:
# f = -f

d_i = (d_o * f) / (d_o - f)
magnification = -d_i / d_o
h_i = magnification * h_o

print(f"Image distance: {d_i:.2f} cm")
print(f"Magnification: {magnification:.3f}")
print(f"Image height: {h_i:.2f} cm")
print(f"Image type: {'real' if d_i > 0 else 'virtual'}")

What to explore next

You might also like