Optical Designer

Sequential ray tracing · 15+ Sellmeier glasses · Spot diagrams · ABCD matrix · Chromatic aberration

# R (mm) Aper Thick Material K

Environment
Scroll zoom ยท Drag pan
System Metrics
Focal Length
โ€”
f-Number
โ€”
NA
โ€”
Total Length
โ€”
Power
โ€”
Optical Design Concepts

Sequential Ray Tracing

Rays are traced surface-by-surface using the exact ray-conic intersection equation. At each interface, Snell's law in vector form computes the refracted direction. This handles spherical, parabolic, hyperbolic, and elliptical surfaces via the conic constant K.

Sellmeier Equation

Refractive index varies with wavelength: n²(λ) = 1 + Σ Biλ² / (λ² − Ci). Each glass type (N-BK7, N-SF11, F2, etc.) has unique B,C coefficients from measured dispersion curves. This is essential for chromatic aberration analysis.

ABCD Matrix Method

The system matrix multiplies refraction and transfer matrices for each surface. The equivalent focal length is 1/B where B is the top-right element. This paraxial approximation gives quick focal length, principal planes, and the condition for imaging.

Spot Diagram & Aberrations

A grid of rays across the entrance pupil is traced to the image plane. The scatter pattern reveals aberration types: spherical (symmetric ring), coma (comet tail), astigmatism (two line foci). RMS spot size compared to the Airy disk indicates diffraction-limited performance.

Sign Convention & Surface Properties

Radius of Curvature (R)

R > 0: Center of curvature to the right (convex to incoming light).
R < 0: Center of curvature to the left (concave).
R = Inf: Flat (plane) surface.
Measured in millimeters.

Conic Constant (K)

K = 0: Sphere
K = −1: Paraboloid
K < −1: Hyperboloid
−1 < K < 0: Prolate ellipsoid
K > 0: Oblate ellipsoid

Thickness

Axial distance from this surface vertex to the next surface vertex (mm). The last surface's thickness is the back focal distance โ€” the gap from the last surface to the image plane. Autofocus adjusts this automatically.

Material

The medium after this surface. Set to a glass type (N-BK7, F2, etc.) for the first surface of a lens element, then Air for the last surface of that element. This defines which medium the refraction goes into.

Frequently Asked Questions
How do I design a lens system online for free?

Use this Optical Designer: choose a preset (achromatic doublet, Cooke triplet, Petzval lens) or add surfaces manually. Set radius, aperture, thickness, and glass material for each surface. The tool instantly traces rays and shows focal length, spot diagram, and aberrations. No download or signup needed.

What is ray tracing in optics and how does this tool do it?

Ray tracing follows light rays surface-by-surface through lenses using Snell's law. This tool uses sequential ray tracing with exact ray-conic intersection math, supporting spheres, parabolas, and aspherical surfaces. It traces up to 13 surfaces in real time, showing 2D cross-section diagrams, spot diagrams, and ray aberration plots.

How do I calculate focal length of a multi-element lens?

This tool calculates focal length automatically using the ABCD ray transfer matrix method. Each surface contributes a refraction matrix and each air gap a transfer matrix. The system focal length equals 1/B of the combined matrix. Results update in real time as you edit surface parameters.

What is chromatic aberration and how do I reduce it?

Chromatic aberration occurs because glass bends different wavelengths by different amounts, causing color fringing. Pair a low-dispersion crown glass (N-BK7) with a high-dispersion flint glass (N-SF2) in an achromatic doublet. Switch to the Chromatic Aberration view to see EFL at three wavelengths and axial CA.

What is a spot diagram and how do I read one?

A spot diagram shows where rays from a point source land on the image plane. A tight cluster means low aberration. The RMS spot radius measures the spread. If RMS is smaller than the Airy disk (1.22 × λ × f/#), the lens is diffraction-limited. Switch to Spot Diagram view to analyze your design.

What glass materials are available?

15+ optical materials with Sellmeier dispersion: Schott glasses (N-BK7, N-SF11, N-SF2, F2, N-FK51A, N-LAK9), fused silica, crystals (CaF₂, BaF₂, MgF₂, sapphire, diamond), and plastics (PMMA, polycarbonate). Each uses the 3-term Sellmeier equation for accurate wavelength-dependent refractive index.

Is this free for students and engineers?

Yes, completely free with no signup. Runs entirely in your browser. Students can learn lens design with presets. Engineers can prototype systems, analyze aberrations, and export as JSON or PNG. Covers undergraduate optics through professional engineering.

How does this compare to Zemax or Oslo?

This is a free browser-based alternative for sequential ray tracing fundamentals: Sellmeier materials, conic surfaces, spot diagrams, ABCD matrix, chromatic analysis. Ideal for learning and quick prototyping. Zemax/Oslo add tolerancing, MTF, coating design, and non-sequential tracing for production work.