主要内容

Optical System Design and Analysis

R2026b
Optical design and simulation, ray tracing, spot diagrams, aberrations, lens distortion, and field curvature analysis for optics applications

Design and simulate optical systems for optics applications using the Optical Design and Simulation Library for Image Processing Toolbox™. The library enables you to create custom optical designs, use bulk glass and coating materials from comprehensive material libraries, import bulk materials, and create custom optical materials and coatings. The library provides visualization tools to visualize optical designs in 2-D and 3-D. Additionally, you can integrate with existing optical designs by importing systems from ZMX files.

You can evaluate optical systems by tracing rays, performing polarization analysis, computing spot diagrams, analyzing aberrations, lens distortion, and field curvature. You can then visualize the results. Additionally, you can optimize optical systems and optical coatings using optimization tools available in the Optimization Toolbox™.

The Optical System Designer app provides an interactive interface for optics and optical system design. You can use the app to design custom optical systems, simulate imported optical systems from ZMX files, and interactively visualize traced rays, spot diagrams, aberrations, distortions, field curvature, and other analysis.

To get started with the Optical Design and Simulation Library for Image Processing Toolbox, see Get Started with Optical Design and Simulation.

You can install the Optical Design and Simulation Library for Image Processing Toolbox from the Add-On Explorer. For more information about installing add-ons, see Get and Manage Add-Ons.

Double Gauss lens system visualized in 2-D (top) and 3-D (bottom) using the Optical Design and Simulation Library.

Apps

Optical System DesignerDesign and analyze optical systems (Since R2026a)

Functions

expand all

Create and Manipulate System Components

opticalSystemModel components of optical system (Since R2026a)
addDiaphragmAdd physical diaphragm component to optical system (Since R2026a)
addImagePlaneAdd image plane component to optical system (Since R2026a)
addImageSensorAdd image sensor to optical system (Since R2026b)
addMirrorAdd mirror component to optical system (Since R2026a)
addRefractiveSurfaceAdd refractive surface component to optical system (Since R2026a)
addGapAdd gap between optical components (Since R2026a)
addAdd optical component to optical system (Since R2026a)
changeGapChange gap between components in optical system (Since R2026a)
distanceAfterQuery distance after optical component (Since R2026a)
distanceBeforeQuery distance before optical component (Since R2026a)
insertInsert optical component into optical system (Since R2026a)
removeRemove component from optical system (Since R2026a)
resolveMaterialsResolve component materials in optical system against glass library (Since R2026a)
setConstructionFrameSet coordinate break for all subsequent components in optical system (Since R2026a)

Tune Optical Systems

focusPosition image plane of optical system to minimize RMS spot size (Since R2026a)
updateSemiDiametersUpdate semi-diameters of surfaces in optical system (Since R2026a)
zmxinfoRead metadata of ZMX file (Since R2026a)
zmximportImport optical system from ZMX file (Since R2026a)

2-D Visualization

view2dVisualize optical system in 2-D (Since R2026a)
OpticalSystemViewer2DCustomize 2-D visualization of optical system (Since R2026a)

3-D Visualization

view3dVisualize optical system in 3-D (Since R2026a)
OpticalSystemViewer3DCustomize 3-D visualization of optical system (Since R2026a)

Ray Tracing

fieldPointCreate field point representation of light source (Since R2026a)
samplingGridCreate ray sampling grid for entrance surface of optical system (Since R2026a)
traceChiefRayTrace chief ray through optical system (Since R2026a)
traceMarginalRaysTrace marginal rays through optical system (Since R2026a)
traceRaysPerform ray tracing through optical system (Since R2026a)
traceDirectedRaysTrace rays from specific origins along specific directions through optical system (Since R2026b)
traceAimedRayTrace ray aimed at specific point on target optical surface (Since R2026b)

Image Quality and Aberration Analysis

chromaticAberrationCompute lateral and longitudinal chromatic aberration of optical system (Since R2026a)
fieldCurvatureCompute tangential and sagittal field curvature (Since R2026a)
lensDistortionCompute geometric lens distortion for optical system (Since R2026a)
rayAberrationCompute tangential and sagittal ray aberration of optical system (Since R2026a)
spotCompute spot at which rays converge in image plane (Since R2026a)
airyDiskRadiusCompute Airy disk radius of diffraction-limited optical system (Since R2026b)
psfCompute point spread function of optical system (Since R2026b)
centroidCompute centroid of point spread function (Since R2026b)
ellipticityCompute ellipticity of point spread function (Since R2026b)
encircledEnergyAtRadiusCompute encircled energy of point spread function (Since R2026b)
radiusAtEncircledEnergyCompute radius at encircled PSF energy (Since R2026b)
strehlRatioCompute Strehl ratio of Huygens PSF (Since R2026b)
mtfCompute modulation transfer function of optical system (Since R2026b)
contrastAtFrequencyCompute MTF contrast at spatial frequencies (Since R2026b)
frequencyAtContrastCompute spatial frequency at MTF contrast level (Since R2026b)

Test Chart Rendering

SimulatedESFRChartSimulated edge spatial frequency response (eSFR) test chart (Since R2026b)
SimulatedColorCheckerChartSimulated ColorChecker test chart (Since R2026b)
renderChartRender test chart in optical system (Since R2026b)
displayChartDisplay test chart with overlaid regions of interest
refreshImageApply postprocess gain to rendered test chart (Since R2026b)

OPD and Wavefront Error Analysis

opdOptical path difference for optical system (Since R2026b)
addWavefrontRMSAdd RMS wavefront error metric to merit function (Since R2026b)
addWavefrontPeakToValleyAdd peak‑to‑valley wavefront error metric to merit function (Since R2026b)

Analysis Visualization

spotDiagramChart displaying spot diagram of optical system (Since R2026a)
showPlot analysis result (Since R2026a)
showEncircledEnergyPlot encircled energy of point spread function (Since R2026b)

Optical System Specifications

halfFieldOfViewCompute half field of view of optical system (Since R2026a)
paraxialInfoCompute paraxial information, including cardinal points, for optical system (Since R2026a)

Manage Glass Library

glassLibraryGlass material library for optical system components (Since R2026a)
changePriorityChange priority of glass material catalog in glass library (Since R2026a)
addGlassCatalogAdd new glass catalog to glass library (Since R2026a)
removeGlassCatalogRemove glass material catalog from glass library (Since R2026a)
restoreDefaultGlassLibraryRestore glass library to default settings (Since R2026a)

Select and Use Glass Materials

pickGlassPick named glass material from glass library (Since R2026a)
searchGlassLibrarySearch glass library for glass material (Since R2026a)
refractiveIndexCompute complex refractive index for optical material (Since R2026a)
resolveMaterialsResolve component materials in optical system against glass library (Since R2026a)
opticalMaterialPickerOptical material picker UI component (Since R2026a)

Create Custom Glass Materials

opticalMaterialCreate optical material (Since R2026a)
refractiveIndexCompute complex refractive index for optical material (Since R2026a)

Select Coating Materials

pickCoatingMaterialPick optical coating material from coating material library (Since R2026a)
coatingMaterialLibraryOptical coating material library (Since R2026a)
addCoatingMaterialAdd new optical coating material to optical coating material library (Since R2026a)
removeCoatingMaterialRemove optical coating material from optical coating material library (Since R2026a)
restoreDefaultCoatingMaterialLibraryRestore optical coating material library to default (Since R2026a)

Create Custom Coating Materials

opticalMaterialCreate optical material (Since R2026a)

Design and Apply Optical Coatings

opticalCoatingCreate optical coating for optical system surfaces (Since R2026a)
fresnelCoefficientsCompute Fresnel coefficients for optical coating (Since R2026a)
addCoatingAdd optical coating to lens surfaces in optical system (Since R2026a)
removeCoatingRemove optical coatings from lens surfaces in optical system (Since R2026a)
opticalCoatingEditorOptical coating editor UI component (Since R2026a)

Manage Optical Coating Library

coatingLibraryOptical coating library for optical system components (Since R2026a)
addCoatingAdd optical coating to optical coating library (Since R2026a)
removeCoatingRemove optical coating from optical coating library (Since R2026a)
restoreDefaultCoatingLibraryRestore coating library to default (Since R2026a)

Browse Optical Coatings

pickCoatingPick optical coating from optical coating library (Since R2026a)
opticalCoatingPickerOptical coating picker UI component (Since R2026a)

Optical Sensitivity and Tolerance Analysis

opticalSensitivityAnalyze sensitivity of optical system (Since R2026b)
OpticalSensitivitySensitivity analysis results of optical system (Since R2026b)
opticalToleranceMonte Carlo tolerance analysis of optical system (Since R2026b)
OpticalToleranceMonte Carlo tolerance analysis results of optical system (Since R2026b)
applyPerturbationApply perturbation from sensitivity or tolerance analysis results (Since R2026b)

Optical Tolerance

opticalToleranceSetOptical tolerances for sensitivity and Monte Carlo analysis (Since R2026b)
addSurfaceRadiusToleranceAdd tolerance for surface radius of curvature (Since R2026b)
addSurfaceConicConstantToleranceAdd tolerance for surface conic constant (Since R2026b)
addSurfacePositionToleranceAdd tolerance for surface position (Since R2026b)
addSurfaceTiltToleranceAdd tolerance for surface tilt (Since R2026b)
addSurfaceAsphericToleranceAdd tolerance for surface aspheric coefficients (Since R2026b)
addComponentPositionToleranceAdd tolerance for component position (Since R2026b)
addComponentTiltToleranceAdd tolerance for component tilt (Since R2026b)
addComponentMaterialToleranceAdd tolerance for component material property (Since R2026b)
addCustomToleranceAdd custom tolerance (Since R2026b)
SurfaceRadiusToleranceTolerance for surface radius of curvature (Since R2026b)
SurfaceConicConstantToleranceTolerance for surface conic constant (Since R2026b)
SurfacePositionToleranceTolerance for surface position (Since R2026b)
SurfaceTiltToleranceTolerance for surface tilt (Since R2026b)
SurfaceAsphericToleranceTolerance for surface aspheric coefficient (Since R2026b)
ComponentPositionToleranceTolerance for component position (Since R2026b)
ComponentTiltToleranceTolerance for component tilt (Since R2026b)
ComponentMaterialToleranceTolerance for component material property (Since R2026b)
CustomToleranceCustom tolerance (Since R2026b)
applyApply tolerance perturbation to optical system (Since R2026b)

Optical Optimization

opticalOptimizationSetOptical tuning parameters for compensator optimization (Since R2026b)
addSurfacePositionTuningAdd tuning parameters for surface position (Since R2026b)
addSurfaceTiltTuningAdd tuning parameters for surface tilt (Since R2026b)
addComponentPositionTuningAdd tuning parameters for component position (Since R2026b)
addComponentTiltTuningAdd tuning parameters for component tilt (Since R2026b)
addCustomTuningAdd custom tuning parameter (Since R2026b)
SurfacePositionTuningTuning parameter for surface position (Since R2026b)
SurfaceTiltTuningTuning parameter for surface tilt (Since R2026b)
ComponentPositionTuningTuning parameter for component position (Since R2026b)
ComponentTiltTuningTuning parameter for component tilt (Since R2026b)
CustomTuningCustom tuning parameter (Since R2026b)

Optical Merit Functions

opticalMeritFunctionOptical merit function (Since R2026b)
addSpotAdd spot RMS metric to merit function (Since R2026b)
addWavefrontPeakToValleyAdd peak‑to‑valley wavefront error metric to merit function (Since R2026b)
addWavefrontRMSAdd RMS wavefront error metric to merit function (Since R2026b)
addCustomMetricAdd custom metric to merit function (Since R2026b)
evaluateEvaluate merit function (Since R2026b)
SpotRMSSpot RMS metric function (Since R2026b)
WavefrontPeakToValleyPeak-to-valley wavefront error metric for optical system merit function (Since R2026b)
WavefrontRMSRMS wavefront error metric for optical system merit function (Since R2026b)
CustomMetricCustom metric function (Since R2026b)
evaluateMetricEvaluate metric function (Since R2026b)

Topics

Get Started

Optical System Analysis

Optical Coatings and Materials

Featured Examples