Play n Tools

Free tools & games for everyone

Free · No sign-up · No accounts

Lens & light lab

Draw ray diagrams for lenses and mirrors, find where the image forms and how big it is, and bend light with Snell's law and total internal reflection.




parallel ray   ray through the centre   ray through the focal point   dashed = traced back (virtual)

How to use

  1. Pick an example, or choose a lens or mirror and type its focal length, the distance to the object and the object’s height.
  2. Drag the slider to move the object and watch the image change: from small and upside down, to the same size at 2F, to large, to virtual and upright inside F.
  3. The coloured lines are the three rays every textbook draws. Where they meet is the image; dashed lines are traced back to a virtual image.
  4. Refraction shows a ray crossing from one material into another. Go from water or glass into air and raise the angle to see total internal reflection.

Keyboard and touch

TabMove between boxes, lists and sliders
← →Move a slider in small steps
EnterDraw again after typing a number

Tips

  • A camera, your eye and a projector all use a converging lens to make a real, upside-down image on a screen or sensor.
  • A magnifying glass works only when the object is closer than the focal point; then the image is virtual, upright and larger.
  • Diverging lenses and convex mirrors always give a smaller, upright, virtual image. That is why car side mirrors show a wide view.
  • Put a bulb exactly at the focal point of a concave mirror and the light leaves as a parallel beam, like a torch.
  • Total internal reflection keeps light inside optical fibres and makes diamonds sparkle: diamond’s critical angle is only about 24°.

About this lab

Lenses and mirrors use the thin-lens and mirror equation 1/f = 1/u + 1/v with the “real is positive” sign rule: converging lenses and concave mirrors have a positive focal length, diverging lenses and convex mirrors a negative one, and a negative image distance means a virtual image. Magnification is −v ÷ u. Rays are drawn as paraxial rays (close to the axis), so they bend at a flat line through the lens or mirror, as in school diagrams.

Refraction uses Snell’s law n₁ sin θ₁ = n₂ sin θ₂, the critical angle sin⁻¹(n₂ ÷ n₁), Brewster’s angle tan⁻¹(n₂ ÷ n₁) and the Fresnel equations for the share of unpolarised light that is reflected. Refractive indices are typical values for yellow light (589 nm); real materials vary a little.

The tests check the formulas against worked textbook cases and check that the three drawn rays really meet at the image. Everything runs on your device.

See you tomorrow!

A fresh daily puzzle every morning, and new tools added every month.

Browse every product