Magnification: $m = -\dfrac{d_i}{d_o}$
$d_i \gt 0$: real image $d_i \lt 0$: virtual image
$|m| \gt 1$: magnified $|m| \lt 1$: reduced
Drag sliders to watch three principal rays update in real time. Instantly see image distance, magnification, and whether the image is real or virtual for convex and concave lenses.
Magnification: $m = -\dfrac{d_i}{d_o}$
$d_i \gt 0$: real image $d_i \lt 0$: virtual image
$|m| \gt 1$: magnified $|m| \lt 1$: reduced
The fundamental law governing a single ideal thin lens is the Gaussian Lens Formula. It assumes the lens thickness is negligible and uses the paraxial approximation (small angles).
$$\frac{1}{f}= \frac{1}{d_o}+ \frac{1}{d_i}$$$f$: Focal length of the lens. $f \gt 0$ for converging (convex) lenses, $f \lt 0$ for diverging (concave) lenses.
$d_o$: Object distance (positive if object is on the side from which light is coming).
$d_i$: Image distance. $d_i \gt 0$ indicates a real image (formed on the opposite side of the lens). $d_i \lt 0$ indicates a virtual image (formed on the same side as the object).
The lateral magnification $m$ tells you the size and orientation of the image relative to the object. It is derived from similar triangles in the ray diagram.
$$m = -\frac{d_i}{d_o}= \frac{h_i}{h_o}$$$m$: Magnification. $|m| \gt 1$ means the image is larger than the object. The sign of $m$ indicates orientation: $m \gt 0$ means the image is upright , $m \lt 0$ means the image is inverted.
$h_o$, $h_i$: Object height and image height, respectively.
Camera Lens Design: Engineers use these exact ray-tracing principles to design lens elements. By combining multiple lenses with different focal lengths and separations, they correct for aberrations and focus light precisely onto a camera sensor. The "Two-Lens System" mode in this simulator is a foundational model for such compound lenses.
Microscopes & Telescopes: These instruments are essentially precise arrangements of two or more lenses. A microscope uses a short-focal-length objective lens to create a magnified real image, which is then viewed through an eyepiece (acting as a magnifying glass). The overall magnification is the product of the magnifications of each stage.
Vision Correction (Eyeglasses): A prescription lens is designed to take an object at a desired distance (e.g., a book at 25 cm for a presbyopic eye) and form a virtual image at the eye's own far point, allowing the eye to focus it properly. This simulator helps visualize how concave or convex lenses shift the apparent image location.
Illumination & Optical Sensor Systems: In automotive lighting, projectors, or barcode scanners, engineers use geometrical optics to direct light from a source (like an LED) through lenses to create a specific beam pattern or to focus light onto a detector. This is a core CAE application for ensuring efficiency and performance before physical prototyping.
First, understand that the "thin lens" concept does not negate real-world lenses. Actual lenses have thickness and aberrations. This simulator is an "ideal first-order approximation model." For example, smartphone camera lenses use multiple cemented elements to cancel aberrations, but their initial design is based on this thin lens model. Next, strict adherence to sign conventions is critically important. If you input a positive focal length for a concave lens or consider the distance to a virtual image as positive, all calculations will be off. Even when using professional optical design software, this convention is often the default setting. Third, avoid setting the lens separation too extremely in "Two-Lens Mode." For instance, bringing a 10cm and a 5cm focal length lens as close as 1cm causes rays to bend sharply, making the image appear behind the lens. This is an unrealistic combination; in actual microscopes, there is a specific fixed distance called the "tube length" between the objective and eyepiece lenses.
Converging lens with f₁ = 100 mm, object distance = 250 mm. Using thin lens equation 1/f = 1/dₒ + 1/dᵢ: 1/100 = 1/250 + 1/dᵢ gives dᵢ ≈ 166.7 mm (real image, inverted). Magnification m = −dᵢ/dₒ = −166.7/250 ≈ −0.67. If object height = 30 mm, image height hᵢ = 30 × (−0.67) ≈ −20 mm. For compound lens (f₁ = 100 mm, f₂ = 80 mm, separation = 150 mm), intermediate image from Lens 1 becomes object for Lens 2, requiring sequential ray tracing calculations.