Thin Lens Simulator
Explore image formation by converging and diverging lenses. Adjust object distance and focal length to see real and virtual images via ray diagrams.
How the Thin Lens Simulator Works
A thin lens bends parallel light rays so they converge to (or diverge from) a focal point. The simulator draws three principal rays from the tip of the object to locate the image, and applies the thin lens equation to calculate exact image properties.
Key Variables
| Symbol | Name | Sign Convention |
|---|---|---|
| d_o | Object distance | Always positive (object on left of lens) |
| d_i | Image distance | Positive = real image (right of lens); Negative = virtual (left of lens) |
| f | Focal length | Positive = converging; Negative = diverging |
| m | Magnification | Negative = inverted; |m| > 1 = enlarged |
| P | Lens power | P = 1/f in diopters (f in metres) |
Three Principal Rays
- Ray parallel to the axis refracts through the far focal point F′ (converging) or appears to diverge from F′ (diverging).
- Ray through the optical centre passes straight through without bending.
- Ray through the near focal point F refracts parallel to the axis (converging) or aimed at F (diverging).
Image Types
| Condition | Image Type | Orientation | Relative Size |
|---|---|---|---|
| d_o > 2f (converging) | Real | Inverted | Diminished |
| d_o = 2f (converging) | Real | Inverted | Same size |
| f < d_o < 2f (converging) | Real | Inverted | Enlarged |
| d_o < f (converging) | Virtual | Upright | Enlarged |
| Any d_o (diverging) | Virtual | Upright | Diminished |
Thin Lens Equation
Rearranged to find image distance:
Magnification
Lens Power
Frequently Asked Questions
What is the sign convention for the thin lens equation?
Object distance d_o is always positive (real object). Image distance d_i is positive for a real image on the far side of the lens and negative for a virtual image on the same side as the object. Focal length f is positive for converging lenses and negative for diverging lenses.
What happens when the object is at the focal point?
When d_o = f, the image forms at infinity — the refracted rays emerge parallel and never converge. This is used in collimators and spotlights to produce a parallel beam.
Why can't a diverging lens form a real image?
A diverging lens always spreads rays apart. The extensions of those diverging rays appear to come from a point on the same side as the object, producing a virtual, upright, diminished image regardless of object position.
How is lens power related to focal length?
Power P = 1/f where f is in metres. A +2 dioptre lens has f = 0.5 m (converging). A −3 dioptre lens has f = −0.33 m (diverging). Eyeglass prescriptions are given in dioptres.