主要内容

addDiaphragm

Add physical diaphragm component to optical system

Since R2026a

Description

Add-On Required: This feature requires the Optical Design and Simulation Library for Image Processing Toolbox add-on.

addDiaphragm(opsys) adds a circular diaphragm component to the optical system opsys. A diaphragm is a thin, opaque structure with a central opening that controls the amount of light passing through the optical system by regulating the size of the opening. When you create an diaphragm using this function, you create a Diaphragm object.

addDiaphragm(opsys,Name=Value) also specifies properties of the diaphragm using one or more name-value arguments. For example, SemiDiameter=3.0 specifies the semi-diameter of the diaphragm as 3.0 millimeters.

example

Examples

collapse all

Create an empty optical system.

opsys = opticalSystem;

To add a lens component to the optical system, create the two refractive surfaces of the lens using the addRefractiveSurface object function. Specify the lens glass material using the Material name-value argument for the first surface. Specify the center thickness of the lens, in millimeters, using the DistanceToNext name-value argument.

addRefractiveSurface(opsys,Radius=50,DistanceToNext=1.5,Material=pickGlass("N-BK7"))
addRefractiveSurface(opsys,Radius=-50)

Add a gap using the addGap object function.

addGap(opsys,20)

Add a diaphragm using the addDiaphragm object function. Specify the diaphragm properties using the DistanceToNext and SemiDiameter name-value arguments.

addDiaphragm(opsys,DistanceToNext=28,SemiDiameter=2)

Add an image plane using the addImagePlane object function.

addImagePlane(opsys,SemiDiameter=2)

Display a 2-D visualization of the optical system by using the view2d object function.

view2d(opsys)

Figure contains an object of type optics.ui.opticalsystemviewer2d. The chart of type optics.ui.opticalsystemviewer2d has title Optical System.

ans = 
  OpticalSystemViewer2D with properties:

            Title: ""
    OpticalSystem: [1×1 opticalSystem]
           Labels: "none"
      FieldPoints: "on"
             Rays: [0×0 optics.ui.Rays2D]
           Parent: [1×1 Figure]

  Show all properties

Input Arguments

collapse all

Optical system to which to add the physical diaphragm, specified as an opticalSystem object.

Name-Value Arguments

collapse all

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example: addDiaphragm(SemiDiameter=3.0) specifies the semi-diameter of the diaphragm as 3.0 millimeters.

Diaphragm semi-diameter, in millimeters, specified as a positive scalar. The semi-diameter is the distance along the positive y-axis from the center of the diaphragm to the edge of the usable optical area. This quantity is half the full diameter of the diaphragm.

Note

For a rectangular diaphragm, use the RectangleSize name-value argument to specify the diaphragm size, instead.

Diaphragm size, in millimeters, specified as a 2-element row vector. The row vector is of the form [Width Height], where Width and Height are the width and height of the rectangular diaphragm surface, respectively.

Note

For a circular diaphragm, use the SemiDiameter name-value argument to specify the diaphragm size, instead.

Distance to the next surface, in millimeters, specified as a positive scalar.

Note

You must specify DistanceToNext as a nonzero value for any surface with a non-ambient material property.

Name of the diaphragm, specified as a string scalar or character vector.

Version History

Introduced in R2026a