🔍Ray Diagram Simulator - Lenses, Mirrors & Two-Lens Systems
Put a converging lens, diverging lens, concave mirror or convex mirror on an optical bench and drag the object arrow or the focal points: the parallel ray, chief ray and focal ray redraw instantly, with solid lines for real rays and dashed extensions for virtual ones. Below the diagram, the thin-lens and mirror equations 1/f = 1/dₒ + 1/dᵢ and m = −dᵢ/dₒ are written out with your numbers, using the real-is-positive sign convention. Two-lens mode feeds the first lens's image to the second as its object, giving the intermediate image, final image and total magnification of a compound microscope or a Keplerian or Galilean telescope.
Free · No sign-up · Runs in your browserLast updated:
Loading tool...
How to use Lens & Mirror Ray Diagram
- 1Pick a preset (camera, projector, magnifier, car mirror…) or choose the type of lens or mirror
- 2Drag the blue object arrow to change distance and height, drag a focal point F to change the focal length, or type values
- 3Read the image distance, magnification and image type next to the three principal rays
- 4Switch to the two-lens system and try the microscope or telescope presets
FAQ
- Where does a converging lens form its image?
- It depends on where the object sits relative to the focal length f. Beyond 2f: a real, inverted, smaller image (a camera). At 2f: real, inverted and the same size. Between f and 2f: real, inverted and enlarged (a projector). Exactly at f: no image, the rays leave parallel. Inside f: a virtual, upright, enlarged image on the same side as the object (a magnifying glass). Press “Move object” to watch the image run off to infinity as the object approaches F and then flip to the near side as a virtual image.
- What sign convention does the tool use?
- The real-is-positive convention common in school and introductory physics: the object distance dₒ is positive for a real object; the image distance dᵢ is positive for a real image (beyond a lens, or in front of a mirror) and negative for a virtual one; f is positive for converging lenses and concave mirrors and negative for diverging lenses and convex mirrors. Magnification m = −dᵢ/dₒ, so a negative m means inverted. Textbooks using the Cartesian convention write 1/v − 1/u = 1/f instead; the physics is the same.
- Why do diverging lenses and convex mirrors always give smaller, upright images?
- Their focal length is negative, so in 1/dᵢ = 1/f − 1/dₒ both terms on the right are negative. That makes dᵢ negative (a virtual image) and smaller in size than both |f| and dₒ, so |m| = |dᵢ|/dₒ is always below 1. The image sits inside the focal length, upright and reduced. That’s why passenger-side car mirrors are convex: things look smaller, but you see a wider field — hence “objects in mirror are closer than they appear”.
- How is the magnification of a microscope or telescope worked out?
- The lenses image one after the other. The objective forms an intermediate image I₁, which becomes the object for the eyepiece at dₒ₂ = d − dᵢ₁ (negative if I₁ would land beyond the eyepiece — a virtual object). The total lateral magnification is M = m₁·m₂. In a microscope the objective makes a magnified real image and the eyepiece acts as a magnifier, giving tens to hundreds of times. For telescopes, which look at distant objects, the useful figure is the angular magnification −f₁/f₂; a Keplerian telescope gives an inverted view, a Galilean one (diverging eyepiece) an upright view.
- Why do all rays bend at the centre line of the lens?
- That’s the thin-lens, paraxial approximation: the lens thickness and surface curvature are ignored, each ray bends once at the lens plane, and only rays at small angles to the axis are considered. Within it the lens equation is exact and every ray from an object point meets at one image point. Real lenses have thickness, spherical and chromatic aberration, so steep rays don’t focus perfectly. The diagram also stretches the vertical scale so rays are easier to see, which makes them look steeper than they really are.