BL2.ru

Thin Lens and Mirror Calculator with Ray Diagram

Enter the object distance d and focal length F — the calculator finds where the image forms, its magnification, whether it is real or virtual, and draws the ray diagram. Drag the object to see how the image changes past F and 2F.

d is the object distance, |F| the focal length without sign (the sign follows the element type), h the object height (optional, 1 by default). Any consistent units.
Calculate

Thin lens equation

1/F = 1/d + 1/f, so f = d·F / (d − F). Converging lens F > 0, diverging F < 0; f > 0 is a real image behind the lens, f < 0 a virtual one on the object side. Magnification Γ = |f| / d; optical power D = 1/F in dioptres (F in metres).

Drawing the image

  1. A ray parallel to the axis passes through the focus F′ after a converging lens;
  2. a ray through the optical centre is undeviated;
  3. a ray through the front focus leaves parallel to the axis.

Where the refracted rays meet is the image; if only their extensions meet, the image is virtual.

Converging lens cases

  • d > 2F — real, inverted, diminished;
  • d = 2F — real, inverted, same size;
  • F < d < 2F — real, inverted, magnified;
  • d = F — no image;
  • d < F — virtual, upright, magnified (magnifier).

Spherical mirrors

The same equation holds with F = R/2: concave F > 0, convex F < 0. Real images form in front of the mirror, virtual ones behind it.

FAQ

How do I find the image distance?
f = d·F / (d − F); use a negative F for a diverging lens. A negative result means a virtual image.
How is magnification calculated?
Γ = |f| / d; image height H = Γ·h.
When is the image of a converging lens virtual?
When the object is inside the focal length (d < F): the image is upright and magnified, like in a magnifying glass.
What is optical power?
D = 1/F with F in metres, measured in dioptres. −2 D glasses are a diverging lens with F = −0.5 m.
How do I find the focal length from d and f?
F = d·f / (d + f). Choose “Focal length from d and f” and enter f with its sign.