主要内容

Rectangular

Rectangular shape

Since R2026a

    Description

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

    A Rectangular object specifies a rectangular shape for a surface represented by a Surface object.

    Creation

    There are two ways to create a Rectangular object.

    • Use the addRefractiveSurface, addDiaphragm, or addMirror function, and specify the RectangleSize name-value argument. Use one of these function when you want to add a surface to an optical system, and specify the surface shape, in a single command. The RectangleSize name-value argument specifies that the surface is rectangular, as well as its dimensions.

    • Use the optics.shape.Rectangular function described here. Use this function when you want to modify the shape of a surface in an optical system, or specify the shape of a surface before you add it to the system. After creating the Rectangular object, you can specify the rectangular shape dimensions by modifying properties of the object.

    To specify a circular surface, use the Circular object, instead.

    Description

    rshape = optics.shape.Rectangular creates a Rectangular object that represents a square surface shape with a width and height of 1.

    rshape = optics.shape.Rectangular(length) specifies a square cross-sectional boundary for a surface, with each side of length length.

    rshape = optics.shape.Rectangular(dim) specifies a rectangular cross-sectional boundary for a surface, with dimensions dim.

    Input Arguments

    expand all

    Square side length, specified as a positive scalar. Units are in millimeters. This square shape describes the aperture distance along the positive y-axis, from the center of the optical surface to the edge of the usable optical area, through which light enters.

    Rectangle dimensions, specified as 2-element row vector. The two element row vector is in the form [width height], where width and height are the width and height of the rectangle, respectively. Units are in millimeters. This rectangle shape describes the aperture distance, along the positive y axis, from the center of the optical surface to the edge of the usable optical area, through which light enters.

    Properties

    expand all

    Rectangle shape width, specified as a positive scalar.

    Rectangle shape height, specified as a positive scalar.

    Version History

    Introduced in R2026a