ReadLensData:

Path: Imaging/Optics

% Draws lenses with spherical or flat surfaces.
 Set the radius to zero for a flat surface in which case p is the
 location of the plane. Otherwise p is the location of the center of
 of the surface.

 Type ReadLensData('demo') for a demo.

 The file format is tab delimited

   14 deg Split Rear Crown Triplet
   radius thickness material index V-no sa
     56.940  11.2   SSK4  1.618   55.1   26.4
   -723.160  14.080  air                 26.4
    -69.060   8.600  SF8  1.689   31.2   24.0
     77.520   4.000  air                 21.0
              8.280  air                 21.1 <- a stop
    -818.920  7.200  SK10 1.623   56.9   24.0
    -59.320   0.400  air                 24.0
    162.520   7.20   SK10 1.623   56.9   24.0
   -248.800   74.755 air                 24.0

   Can also handle files with the material column omitted.
--------------------------------------------------------------------------
   Form:
   l = ReadLensData( file, t )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   file      (1,:)   File name

   -------
   Outputs
   -------
   l         (:)     Lens data structure
                     .r     (1,1) Radius of one surface
                     .t     (1,1) Thickness
                     .matl  (1,:) Material name
                     .index (1,1) Index of Refraction
                     .vNo   (1,1) Abbe V-number, the reciprocal of the
                                  relative dispersion of the material
                     .sa    (1,1) Semi aperture (i.e. radius)
   t         (1,:)   Title

--------------------------------------------------------------------------

Children:

Common: General/DeBlankLT
Common: General/StringToTokens
Common: Graphics/NewFig
Common: Graphics/PltStyle
Common: Graphics/XLabelS
Common: Graphics/YLabelS
Imaging: Lenses/LensDemo
Imaging: Optics/DrawLens

Back to the Imaging Module page