Loading Lenstrain…

Open Tools · Optics and photonics

Lenstrain: free online lens design and ray tracing tool

Lenstrain traces rays through a lens system you describe surface by surface: radius, conic constant, thickness, glass and clear aperture, with the stop on any surface. From the paraxial trace it reports effective, back and front focal lengths, principal and nodal points, pupils, f-number, numerical aperture, magnification and the Lagrange invariant at every wavelength you choose. Exact skew rays through spherical and conic surfaces give spot diagrams, tangential and sagittal ray fans, through-focus curves and distortion, and the Seidel sums show where each aberration comes from, surface by surface.

Glass data is yours to enter as a constant index, an n_d and Abbe number pair, or Sellmeier and Cauchy coefficients; only two published fits and two generic glasses ship as examples. Two more workspaces reuse the same model: Gaussian beam propagation through thin lenses with the complex beam parameter, and an imaging and detector calculator for field of view, pixel sampling, diffraction, depth of field and a photon-budget signal-to-noise ratio. Everything runs in a Web Worker on your device, every reference case runs in the Verify view, and the exact-ray results are checked against third-order theory in the limit.

What Lenstrain can do

  • Sequential paraxial and exact ray tracing through spherical and conic surfaces with real pupil aiming
  • First-order properties: EFL, BFL, FFL, principal and nodal points, pupils, f-number, NA, magnification
  • Seidel sums S_I to S_V and first-order colour per surface, with wavefront coefficients and Petzval radius
  • Spot diagrams, ray fans, through-focus RMS, best focus and exact-ray distortion at several fields and wavelengths
  • Gaussian beam propagation through thin lenses: waist, Rayleigh range, divergence, curvature and Gouy phase
  • Detector design: field of view, IFOV, GSD, Airy disk, Nyquist and sampling ratio, depth of field, SNR
  • JSON projects, CSV prescription, spot and Seidel exports, SVG and PNG charts

How we verify Lenstrain

Reference checks have individual provenance and source status. Pending sources do not count as passes; consult the reference suite for the current results. Where a reference answer exists you can run every check yourself on the Verify page, and the Lenstrain user guide documents every feature and limitation.

Every output Lenstrain shows has at least one declared ledger comparison that does not share its formula with the engine (a test derives the list of displayed outputs from the engine and fails if one is missing), and the same case file runs in our automated tests and in the Verify workspace on your device. Each case declares exactly which outputs it compares, with an absolute and a relative tolerance; a case passes only when every declared comparison is finite and within tolerance, and a shortened or substituted result set fails.

Lenstrain is part of Open Tools, the free engineering tools that run in your browser.

Professional use. Results are for education and preliminary design. They must be checked by a qualified professional, and they are not a substitute for code-compliant design or licensed engineering judgement.