主要内容

glassLibrary

Glass material library for optical system components

Since R2026a

    Description

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

    Use the GlassLibrary object to load a library of bulk glass optical materials for optical system components. Assign an optical material to an optical component at component creation.

    To add a new optical glass vendor catalog to the glass library, use the addGlassCatalog object function. To remove a glass catalog from the glass library, use the removeGlassCatalog object function. To change the order of the glass catalog in the glass library, use the changePriority object function. The order of the glass catalogs determines their priority when you use the pickGlass function to query a material that exists in more than one catalog. Use the restoreDefaultGlassLibrary function to restore the default glass library.

    Creation

    Description

    gl = glassLibrary loads the default glass material library.

    example

    Properties

    expand all

    This property is read-only.

    Glass library table listing the available glass catalogs for use in the optical system, represented as a table. The table contains these columns:

    • Index — Index representing the order of the glass material catalog

    • Name — Name of the glass material catalog

    • File — File location of the AGF file from which glassLibrary imports the glass material catalog

    Use the pickGlass function to find a specific glass material in the glass library and list its optical properties. The index of the glass catalog in Index determines its priority when you use the pickGlass function to query a material that exists in more than one catalog.

    Use the searchGlassLibrary function to search the glass material catalog for a specific type of material based on its glass catalog or optical properties such as index of refraction and acceptable wavelengths.

    This property is read-only.

    All available glass materials, represented as an N-by-1 vector of opticalMaterial objects. N is the total number of distinct optical materials in the glass library. Each element of the array represents a glass material, listed in the same order as in the corresponding glass catalog from the GlassCatalogTable property.

    Object Functions

    addGlassCatalogAdd new glass catalog to glass library
    removeGlassCatalogRemove glass material catalog from glass library
    changePriorityChange priority of glass material catalog in glass library

    Examples

    collapse all

    Load the glass material library containing all available glass catalogs and the materials that they contain.

    gl = glassLibrary
    gl = 
      GlassLibrary with properties:
    
        GlassCatalogTable: [6×3 table]
                  Glasses: [1775×1 opticalMaterial]
    
    

    Display the glass material vendor catalog table.

    gl.GlassCatalogTable
    ans=6×3 table
        Index         Name                                                                                 File                                                                        
        _____    ______________    ____________________________________________________________________________________________________________________________________________________
    
          1      "SCHOTT"          "/mathworks/devel/bat/filer/batfs2566-0/Bdoc26a.3146167/build/runnable/matlab/toolbox/images/supportpackages/optics/catalogs/glass/SCHOTT.AGF"      
          2      "HIKARI"          "/mathworks/devel/bat/filer/batfs2566-0/Bdoc26a.3146167/build/runnable/matlab/toolbox/images/supportpackages/optics/catalogs/glass/HIKARI.AGF"      
          3      "OHARA"           "/mathworks/devel/bat/filer/batfs2566-0/Bdoc26a.3146167/build/runnable/matlab/toolbox/images/supportpackages/optics/catalogs/glass/OHARA.AGF"       
          4      "SUMITA"          "/mathworks/devel/bat/filer/batfs2566-0/Bdoc26a.3146167/build/runnable/matlab/toolbox/images/supportpackages/optics/catalogs/glass/SUMITA.AGF"      
          5      "CDGM"            "/mathworks/devel/bat/filer/batfs2566-0/Bdoc26a.3146167/build/runnable/matlab/toolbox/images/supportpackages/optics/catalogs/glass/CDGM.AGF"        
          6      "EDMUNDOPTICS"    "/mathworks/devel/bat/filer/batfs2566-0/Bdoc26a.3146167/build/runnable/matlab/toolbox/images/supportpackages/optics/catalogs/glass/EDMUNDOPTICS.AGF"
    
    

    Version History

    Introduced in R2026a