Optical bench
Trace rays through a system of thin lenses; drag the object and lenses, set focal lengths, and see real/virtual image formation and magnification.
About this tool
Paraxial thin lenses in air, light travelling toward increasing x. Positions, object height, focal lengths and clear diameter are in centimetres. Positive focal length converges; negative diverges. The object must be before every lens. Lenses are processed by position, preserving their row identities; lenses at the same position are ideal contact lenses.
Propagation uses [[1,d],[0,1]], a lens [[1,0],[−1/f,1]]. From the object plane to immediately after a lens the matrix is [[A,B],[C,D]]. A finite conjugate is at distance−B/D with total magnification 1/D. D=0 means collimated output at that stage; later lenses may focus it. An intermediate image in a later lens plane is valid. Per-lens conjugates are predictions before later elements act, not necessarily images physically formed between lenses.
The displayed fan samples rays aimed across the first lens aperture. A ray stops if a later aperture blocks it. An analytic slope interval determines whether any rays can pass and adds a representative transmitted ray when needed. Geometric image predictions ignore blocking; if all rays are blocked no image arrow is shown. Dotted lines are straight backward extensions of final rays for a virtual image. Grey dots mark focal points.
The diagram uses independent x/y scales, so apparent angles are exaggerated; the numeric ray coordinates are unchanged. Extremely distant/tall images can lie outside the finite view while their values remain available. Move elements by dragging or exact fields. Three presets illustrate a single image, a collimated intermediate focused by another lens, and a relay. Ideal monochromatic geometry only: no lens thickness, aberrations, diffraction or real intensity integration. Large slopes exceed the paraxial approximation. Valid settings survive reload.