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 / Metalens

Metalens

Focuses light through a flat phase-gradient model with adjustable efficiency, using either diffractive chromatic focusing or an idealized achromatic band.

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 metalens is a flat optical surface patterned with subwavelength structures. Those meta-atoms impose a position-dependent phase delay instead of relying on the curved entrance and exit faces of a glass lens. An ideal focusing phase profile at design wavelength λ₀ is hyperbolic rather than the quadratic profile of the paraxial limit:

ϕ(r,λ0)=−2πλ0(f02+r2−f0)(mod2π)\phi(r,\lambda_0) = -\frac{2\pi}{\lambda_0}\left(\sqrt{f_0^2+r^2}-f_0\right) \pmod{2\pi}
Ideal phase required to bring a normally incident plane wave to a focus f₀ from radius r.
NA=sin⁡ ⁣[arctan⁡ ⁣(D2∣f0∣)]\mathrm{NA} = \sin\!\left[\arctan\!\left(\frac{D}{2|f_0|}\right)\right]
Geometric numerical aperture in air for clear diameter D and focal length f₀.

The direction of that colour error is the surprising part, and worth holding on to: a metalens is chromatic the opposite way round from glass. A refractive lens has a higher index in the blue, so blue comes to a focus nearer than red. A diffractive surface has a focal length inversely proportional to wavelength, so red focuses nearer and blue further away. Their colour fringes therefore run in opposite directions — which is also why a diffractive surface can be used to cancel the chromatic aberration of a refractive one rather than compounding it.

A phase pattern fabricated for one wavelength normally has strong diffractive chromaticity: longer wavelengths focus nearer and shorter wavelengths focus farther away. Achromatic metalenses add engineered group delay, but bandwidth, aperture, NA, polarization response, and efficiency are coupled design constraints rather than independent knobs[1]. Practical focusing efficiency also sends some incident power into zeroth order, unwanted diffraction orders, reflection, absorption, and scatter[2].

In OpticalSetup

OpticalSetup treats the patterned surface as a zero-thickness paraxial phase-gradient proxy. In Chromatic mode, the nominal focal length f₀ is exact at the design wavelength and every sampled wavelength follows the ordinary diffractive scaling:

f(λ)=f0λ0λf(\lambda) = f_0\frac{\lambda_0}{\lambda}
The wavelength-dependent focal length used by the chromatic metalens trace.
u′=u−hf(λ)u' = u - \frac{h}{f(\lambda)}
Each sampled wavelength then uses the same paraxial ray-transfer relation as the ideal thin lens.

A broadband ray is expanded into the same weighted wavelength samples used by prisms and gratings, making axial color visible in the actual traced paths. Idealized achromatic band holds f=f₀ inside the chosen range and transitions continuously back to diffractive scaling outside it. Focusing efficiency attenuates the focused output by the configured power fraction.

Simplified vs. reality

No phase map or electromagnetic field is propagated. The simulator does not design meta-atoms, derive efficiency, show the unfocused zeroth order, validate group-delay feasibility, or calculate polarization conversion, PSF, MTF, Strehl ratio, diffraction-limited spot size, field angle, aberrations, substrate effects, or fabrication tolerances. Achromatic mode is explicitly an idealized system-level behavior, not proof that the selected diameter, NA, bandwidth, and efficiency can be fabricated together.

Related components

References

  1. Arbabi et al., “Subwavelength-thick lenses with high numerical apertures and large efficiency,” Nature Communications 6, 7069 (2015)
  2. Khorasaninejad et al., “Metalenses at visible wavelengths,” Science 352, 1190–1194 (2016)

Further reading