主要内容

Surface

Optical surface properties

Since R2026a

    Description

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

    A Surface object specifies the properties of a surface in an optical system, such as its shape and radius of curvature.

    Creation

    Create a Surface object using these options.

    • Use the addRefractiveSurface object function. Use this function to add at least two refractive surfaces, which constitute a lens element, as the next component of an optical system. You can specify their properties, such as shape, material, and aspheric coefficients, using name-value arguments. When you add two or more surfaces using addRefractiveSurface, you create a LensElement object.

    • Use the addDiaphragm object function. Use this function to add a diaphragm, which contains a surface, as the next component to an optical system. You can specify its properties, such as shape and semi-diameter, using name-value arguments.

    • Use the addMirror object function. Use this function to add a mirror, which contains a surface, as the next component to an optical system. You can specify its properties, such as shape, radius, and aspheric coefficients, using name-value arguments.

    • Use the addImagePlane object function. Use this function to add an image plane, which contains a surface, as the next component to an optical system. You can specify its properties, such as semi-diameter, using name-value arguments.

    • Use the optics.surface.Surface function described here. Use this function when you want to create a surface without adding it to the optical system, or modify the properties of a surface already in the system. After creating the object, you can specify the surface properties by modifying the properties of the object.

    Description

    rsurf = optics.surface.Surface creates a Surface object with default properties.

    example

    rsurf = optics.surface.Surface(PropertyName=Value) sets writeable properties using one or more name-value arguments.

    Example: optics.surface.Surface(Radius=10) creates a Surface object representing a surface with a radius of 10.

    Properties

    expand all

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

    Radius of curvature of the surface, specified as a numeric scalar.

    Aspheric coefficients describing the aspheric profile of the surface, specified as a 20-element row vector. By default, both even-powered and odd-powered aspheric coefficients are equal to zero, and the surface is spherical. The conic surface shape depends on the magnitude and sign of the conic constant specified by the ConicConstant property.

    Even-powered aspheric coefficients describing the aspheric profile of the surface, specified as a 10-element row vector.

    Conic constant that defines the conic shape of the aspheric surface profile, specified as a numeric scalar. Depending on the value of the conic constant K, the aspheric surface has these conic shapes.

    ConicConstant ValueConic Shape

    K = 0

    Sphere

    K in range [-1,0]

    Ellipse

    K = -1

    Parabola

    K in range [-inf,-1]

    Hyperbola

    Normalization radius, specified as a positive scalar. The normalization radius is used to non-dimensionalize the higher-order terms in the polynomial describing the aspheric surface.

    Shape of the surface, specified as one of these options.

    By default, the shape of the surface is circular, with a semi-diameter of 1.

    Optical coating applied to the surface, represented as an opticalCoating object. By default, the coating is applied to the front of the surface. To specify whether to apply the coating to the front, back, or both parts of lens surfaces, use the CoatingSide name-value argument of the addCoating function.

    Position of the first vertex of the surface, specified as a 3-element row vector. The vector is in the form [x y z], where each element is the x-, y-, and z-coordinate in the local coordinate system of the component that contains the surface.

    To learn more about the local component coordinate system, see Coordinate Systems in Optical Design.

    Tilt angles of the surface, specified as a 3-element row vector. The vector is in the form [θx θy θz], where θx, θy, and θz are tilt angles with respect to the x, y, and z-axes, respectively, of the local coordinate system of the component that contains the surface.

    To learn more about the local component coordinate system, see Coordinate Systems in Optical Design.

    Note

    The TiltAngles property represents Euler angles. If you specify angles that are multiples of 90 degrees, visually verify the orientation of the optical system. Gimbal lock can occur, in which two of the three rotational axes become aligned. This alignment results in the loss of one degree of freedom, and can lead to ambiguous or unintended orientations.

    Examples

    collapse all

    Create an empty optical system.

    opsys = opticalSystem(Name="Lens");

    Create two lens surfaces using the optics.surface.Surface function. Specify the radius of curvature of the surfaces using the Radius property.

    surf1 = optics.surface.Surface(Radius=2);
    surf2 = optics.surface.Surface(Radius=-2);

    Create a LensElement object, which represents a lens element, using the optics.component.LensElement function. Specify the two lens surfaces to the Surfaces property of the component object. Specify the thickness of the lens as 2.5 millimeters using the Thickness property of the LensElement object.

    lens = optics.component.LensElement(Surfaces=[surf1,surf2],Thickness=2.5)
    lens = 
      LensElement with properties:
    
              Name: [0×0 string]
         Materials: [1×1 opticalMaterial]
         Thickness: 2.5000
          Surfaces: [1×2 optics.surface.Surface]
             Shape: [1×2 optics.shape.Circular]
          Coatings: [0×0 opticalCoating]
          Position: [0 0 0]
        TiltAngles: [0 0 0]
    
    

    Add the lens element component to the optical system using the add function.

    add(opsys,lens)

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

    view2d(opsys)

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

    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
    
    

    Version History

    Introduced in R2026a