Design optics with Python
Optiland is a Python package for lens design and optimization. Model optical systems, trace rays, analyze aberrations, and optimize designs — all in code.
quickstart.py
# Design a simple doublet lensfrom optiland.samples import CookeTripletfrom optiland.analysis import SpotDiagram# Create the optical systemlens = CookeTriplet()# Trace rays and visualizelens.draw()# Analyze aberrationssd = SpotDiagram(lens, fields=(0,1))sd.view()
Everything you need for lens design
Sequential Ray Tracing
Fast, accurate ray tracing through complex multi-element optical systems.
Aberration Analysis
Spot diagrams, wavefront maps, Zernike decomposition, MTF, and more.
Automated Optimization
Gradient-based and global optimizers to meet your design specifications.
Python-native API
Clean, composable API — integrate with NumPy, SciPy, and your own code.
Open Source
MIT licensed. Inspect, extend, and contribute to every part of the codebase.
Rich Visualizations
2D/3D layouts, ray fans, field maps — powered by Matplotlib.
Join the community
Ask questions, share designs, and help shape the future of Optiland.
Go to Community Forum