Lens Ray Diagram Simulator

Three principal rays tell the whole story of a lens: the parallel ray bends through the far focal point, the central ray goes straight through, and the focal ray emerges parallel. Where they meet — or appear to meet — is the image. Drag the object and change the focal length to watch real images shrink, grow, and finally become virtual.

FF1/f = 1/dₒ + 1/dᵢ → dᵢ = 124 px | m = -0.78
Image real, invertedMagnification 0.78×

Controls

  • Object distance: How far the object (arrow) sits in front of the lens in cm. Drag it from far away to inside the focal point.
  • Focal length: The focal length of the converging lens in cm. Shorter f means a stronger, more bending lens.

The physics

Assumptions

  • Thin converging lens (f > 0)
  • Paraxial rays — rays stay close to the optical axis
  • The lens is in air (same medium both sides)
  • Monochromatic light — no chromatic aberration

Guided activity

  1. Set f = 10 cm and d_o = 30 cm. Use the lens equation to predict d_i, then check the ray crossing point in the simulator.

  2. Move the object to d_o = 20 cm (exactly 2f). Where does the image form, and what is its size relative to the object?

  3. Move the object inside the focal length (d_o = 5 cm). The rays now diverge — trace them backward to find the virtual image. Is it magnified or reduced?

  4. Find the object distance that makes the image land exactly at 2f on the other side. What must d_o be? Why is the situation symmetric?

Challenge questions

  1. When the object sits exactly at the focal point, the equation gives division by zero and the rays emerge parallel. What does 'image at infinity' mean physically?

  2. A camera focuses a distant mountain (d_o → ∞). Where does the image form, and why is the film placed there?

  3. Explain why every real image formed by a single converging lens is inverted, using the ray that passes through the lens center.