Lens Simulator

Thin-lens ray tracing for converging and diverging lenses: principal rays, image location, and magnification sign conventions.

Who it's for: Geometric optics; sign rules and real vs virtual images.

Key terms

  • thin lens
  • focal length
  • magnification
  • real image
  • virtual image

How it works

Thin-lens ray diagrams use three principal rays: parallel to the axis then through the focal point; straight through the lens center; through the object-side focal point then parallel to the axis. The thin-lens equation links object distance, image distance, and focal length.

Key equations

1/f = 1/d_o + 1/d_i
m = h_i/h_o = −d_i/d_o