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.
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.
Getting Started
Core Functionalities
Example Gallery
Learning Guide
Developer's Guide
- 1. Introduction
- 2. System Requirements
- 3. Installation
- 4. Getting Starting with the Codebase
- 5. Architecture Overview
- 6. Code Structure
- 7. Configurable Backend
- 8. Ray Tracing Framework
- 9. Surface Overview
- 10. Interaction Models
- 11. Propagation Models
- 12. Geometry Overview
- 13. Analysis Framework
- 14. Optimization Framework
- 15. Tolerancing Framework
- 16. Multi-Configuration Framework
- 17. Visualization Framework
- 18. Optiland File Format
- 19. Optiland GUI
Contributing
API Reference
Authors
License
References