Welcome to Optiland’s documentation!

Note

This project is under active development.

Optiland is a Python‑based, open‑source framework for optical design, analysis, and optimization. Its clean, Pythonic API makes it easy to:

  • Build, trace, and analyze lens and mirror systems (paraxial → real → polarization-aware)

  • Perform paraxial, wavefront, PSF/MTF, and scattering analyses

  • Optimize via local/global solvers or differentiable ML pipelines

  • Visualize in 2D (interactive, themeable matplotlib) and 3D (VTK)

  • Extend with custom surfaces, coatings, optimization operands, and more

Under the hood, Optiland leverages NumPy for CPU‑bound tasks and PyTorch for GPU acceleration and autograd‑enabled workflows - so you get the best of both worlds.

_images/telephoto.png


Python code to generate this 3D visualization:

from optiland.samples.objectives import ReverseTelephoto

lens = ReverseTelephoto()
lens.draw3D()

Try it Now

Use the interactive shell to try Optiland in your browser! Note that loading the interactive shell may take a few seconds.

Not sure what to type in the shell? Here are a few ideas to explore Optiland right away:

lens.draw()  # Visualize the optical layout
effl = lens.paraxial.f2()  # Retrieve the effective focal length
# Trace 1024 random rays for the on-axis field point, then use rays.x, rays.y for intersection points
rays = lens.trace(Hx=0, Hy=0, wavelength=0.55, num_rays=1024, distribution="random")
# Run a spot diagram analysis
from optiland.analysis import SpotDiagram
spot = SpotDiagram(lens)
spot.view()

Note

3D plotting does not work in the interactive shell, but you can run the code in your local Python environment to try the 3D visualizations.

Authors

License

References