AI Blocks › Build and ship software
Optical system designer
Describe the lens setup. Get an optical system built, traced, toleranced and tuned in MATLAB.
Optical system designer is a free AI skill for the job "Build and ship software". Give the instructions to an AI assistant that supports the required files and tools, then review its output.
Free · No account · BSD 2 Clause licence · Made by MathWorks · Level: expert · Thinking: high
Made by MathWorks. See the original on GitHub; we copied it as it is, with its licence.
What it does
Describe the lens setup you want and get a working optical model in MATLAB that has been traced, toleranced and tuned. It saves you from hand-building every surface and chart. The skill uses the MATLAB optics library. It builds the system from surfaces and glass catalogues, imports Zemax files, then runs the standard checks: spot diagrams, ray fans, distortion, chromatic aberration and astigmatism. It can also test coatings and polarisation, run tolerance studies to see how much error the design can take, and optimise parameters to improve the result. It covers geometric optics only, not wave optics, fibre or photonics. You need MATLAB with the optics add-on installed.
You give it
- Lens specification or a Zemax file
- Wavelengths and field angles
- Glass choices (optional)
- Targets such as spot size or focal length (optional)
- MATLAB with the optics add-on
You get
- A built optical system
- Spot diagrams and ray fan plots
- Tolerance analysis results
- An optimised design with changed parameters
Use it when
- You are designing a camera lens and need to see its aberrations.
- You have a Zemax file and want to analyse it in MATLAB.
- You need to know how much manufacturing error a design can survive.
- You want to tune lens spacing and curvature to shrink the spot size.
How to use it
- Add it to your AI once: download it and add the folder to Claude, ChatGPT or Codex as a skill.
- Ask for the job in your own words. Your AI opens the skill when it fits.
- It works best when your AI can run MATLAB with the Optical Design and Simulation Library.