Free software

About OpticalSetup

Copyright © 2026 Luca Genchi and contributors.

OpticalSetup is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

It is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See the GNU General Public License for more details.

The numbers OpticalSetup reports come from models with stated limits; read each component's page in the wiki before relying on one.

If you use OpticalSetup in your research, teaching or publications, please cite the software:

Bertoncini, A., & Genchi, L. (2026). OpticalSetup - the optical workbench software [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.23191537

Wiki / Lenses / Aspheric lens

Aspheric lens

Refracts light through conic and polynomial lens surfaces, so changing the surface shape directly changes ray intersections, focusing, and spherical aberration.

Open in the canvas →

A live trace, not a picture of one — but this preview is not interactive. Open it in the canvas to move things, change parameters, and save or export your own version.

In the real world

A sphere is easy to make and wrong for the job. Grinding two glass surfaces against each other with rotation and pressure naturally produces spheres, which is why almost every lens ever made has been one — but a sphere does not bring a wide collimated beam to a single point. Rays through the outer part of the lens cross the axis closer than rays near it, and that gap is spherical aberration[3]. It is not a manufacturing defect; it is what the shape does.

The classical fix is more glass: split the power over several elements so each bends the light less, and the aberration each contributes partly cancels. That works, and it is why a fast camera lens has many elements. An asphere takes the other route — keep one element and give it the surface the problem actually calls for.

The surface that has no spherical aberration

For one conjugate pair the exact surface is known in closed form. Take a plano-convex singlet with the flat face toward a collimated beam: light enters without deviation, and the curved exit face has to turn a plane wavefront into a perfect spherical one converging on the focus. The surface that does it exactly is a hyperboloid of conic constant

k=−n2k = -n^{2}
The conic constant that eliminates spherical aberration for a plano-convex singlet focusing a collimated beam, with the curved face toward the focus. For N-BK7 at 587.6 nm, n = 1.5168 and k = −2.301.
x(y)=c y21+1−(1+k)c2y2+A4y4+A6y6+A8y8x(y) = \frac{c\,y^{2}}{1 + \sqrt{1 - (1+k)c^{2}y^{2}}} + A_{4}y^{4} + A_{6}y^{6} + A_{8}y^{8}
The even-asphere sag, the standard prescription form. c = 1/R is the vertex curvature; k selects the conic; the polynomial terms correct what the conic alone cannot.

The conic constant names the family: k = 0 is a sphere, −1 < k < 0 an ellipsoid, k = −1 a paraboloid, and k < −1 a hyperboloid. A parabola is the shape that collimates a point source by reflection — which is why the parabolic mirror exists — but refraction has an index in it, so the shape that does the equivalent job in glass is a hyperbola instead.

One conjugate is all a conic can fix. Correct a lens for a collimated input and it is no longer corrected for a nearby object, and nothing about the conic addresses off-axis aberrations — coma and astigmatism survive untouched. The A₄, A₆, A₈ terms exist for that: extra degrees of freedom, each beginning at a higher power of the ray height, that let a designer trade residual aberrations against each other across a field rather than perfecting a single point. They start at fourth order precisely so they leave the paraxial focal length alone.

Why they are everywhere now

Aspheres were long a specialist item because a non-spherical surface cannot be made by the natural grinding process. Moulded glass and plastic, single-point diamond turning, and deterministic polishing changed the economics, and the result is that one moulded asphere now routinely replaces a two- or three-element spherical assembly[1]. Laser diode collimators, fiber-coupling lenses, condensers and every phone camera stack rely on them — anywhere the alternative is more elements, more weight, more surfaces to coat and more light lost.

In OpticalSetup

Both faces carry an independent radius, conic constant and A₄/A₆/A₈ set. What matters is that these are not a drawing instruction: the tracer isolates intersections on the analytic profile and refracts off its local derivative, including paired crossings near tangency. The same realized analytic faces determine whether a source begins inside the glass. Changing k therefore changes where rays actually cross the glass and where they end up. There is no paraxial correction applied afterwards — the aberration is whatever the surface produces.

That claim is checkable, and worth checking, because it is the whole point of the element. Set up the classic case — flat face toward a collimated beam, curved face toward the focus — and sweep the conic while measuring the focused spot:

k = 0 gives 1.08 mm. k = −2 gives 0.14 mm. k = −2.3 gives 0.0009 mm. k = −2.6 is back to 0.14 mm. The collapse sits at −2.301, which is −n² for N-BK7 at that wavelength, and it moves when you change glass: N-SF11 wants −3.19, fused silica −2.13. Nothing puts those numbers in — they come out of the geometry.

With k = 0 and no polynomial terms the element reduces to the spherical singlet exactly, which is the other half of the same claim: same throughput, same focus, same aberration. Radii follow the same Cartesian sign convention, so a prescription can be moved between the two.

Realized versus requested

Three constraints are applied to keep a prescription physical, and all three are reported rather than applied quietly. A conic with 1 + k > 0 has a finite radial extent, so a radius too short for the requested aperture is increased until the aperture fits on the surface. Centre thickness is increased when needed to leave a real edge. And the aspheric departure is bounded: if A₄y⁴ + A₆y⁶ + A₈y⁸ exceeds the semi-aperture anywhere across the clear aperture, all three coefficients are scaled by a common factor until it does not.

That third one is easier to reach than it looks, and it is worth knowing where. At the default 25.4 mm diameter the departure bound bites at about A₄ = 5 × 10⁻⁴, so a typed A₄ = 0.001 is traced at roughly half its value. Because the three terms are scaled together the ratio between them is preserved, but the surface traced is not the surface requested — it is a smaller relative of it. Real catalogue aspheres sit far below this, in the 10⁻⁵ range and below, where nothing is rescaled; the guard exists so that a hand-edited or stale scene cannot produce a metre-deep surface. The inspector reports the geometry actually traced, so a rescaled prescription is visible rather than inferred.

Simplified vs. reality

This is a 2D meridional section of a rotationally symmetric lens, so only aberrations that live in that plane can appear. Spherical aberration and defocus do; coma, astigmatism and field curvature need the third dimension or a real off-axis field and do not — which means the A₄/A₆/A₈ terms cannot be used here for the field-balancing job they mostly exist to do in real designs. There are no skew rays.

The paraxial focal length and back focal distance in the panel are computed from vertex curvature and centre thickness, exactly as for a spherical singlet, because neither the conic nor the polynomial terms change curvature at the vertex. They therefore describe the paraxial limit and say nothing about the aberration the rest of the surface produces. How little they say is easy to measure: for the default prescription the panel quotes a back focal distance of 54.094 mm, and a traced ray at the very edge of the clear aperture crosses the axis 11 µm from it — while the same lens with k₁ set to 0 keeps the identical quoted number and focuses its edge ray 2.8 mm short. Two lenses, one readout, a 250-fold difference in what actually happens. The ray trace is the thing to look at.

Nothing here is manufactured: there is no surface figure error, no roughness, no centring tolerance, and no coating: on the default per-surface transmission every face loses the same fixed fraction at any wavelength and angle, and on bare glass the loss follows the Fresnel equations alone. A real asphere is corrected for one conjugate and one wavelength; this one is as good as its prescription at every wavelength the glass transmits, with only the catalogue dispersion moving the answer.

With Surfaces set to Per-surface transmission, the default, each face applies a flat configured percentage and total internal reflection acts as an ideal mirror. Set to Bare glass (Fresnel), each face transmits s and p by the Fresnel equations at the angle the ray actually meets it, as a prism's faces do, and total internal reflection shifts the phase of s against p; the reflected part of the light is not traced.

Related components

References

  1. Edmund Optics — “All About Aspheric Lenses”: how aspheres replace multi-element spherical assemblies, and how they are manufactured
  2. R. Paschotta, “Aspheric Optics,” RP Photonics Encyclopedia
  3. R. Paschotta, “Spherical Aberrations,” RP Photonics Encyclopedia

Further reading