3. Tour of Component Functions

Introduction

Loading

3.1 Absorbers, Pinholes, and Slits

3.1.1 Using PinHole
3.1.2 Making a Slit with PinHole
3.1.3 The Absorption Generic Building Block

3.2 BeamSplitters

3.2.1 Using BeamSplitter
3.2.2 Using BeamSplitterCube

3.3 Boundaries

3.4 Fiber

3.5 Graphic Shapes

3.5.1 Making Three-Dimensional Abstract Graphics
3.5.2 Making an Arbitrary Polygon Graphic Shape

3.6 Gratings

3.6.1 Using GratingSurface
3.6.2 The DiffractionMismatch Parameter
3.6.3 Using GratingMirror
3.6.4 Using SphericalGratingMirror
3.6.5 The DiffractionOrderNumber Parameter
3.6.6 Creating a Bragg Grating
3.6.7 Diffracting Several Colors
3.6.8 The Diffraction Generic Building Block

3.7 Lenses

3.7.1 Spherical Lenses
3.7.2 Cylindrical Lenses
3.7.3 CustomLens
3.7.4 Window
3.7.5 The DesignWaveLength Option
3.7.6 Light through a Glass Ball
3.7.7 The Refraction Generic Building Block

3.8 LensSurface Functions

3.8.1 Making a Hybrid Lens with LensSurface
3.8.2 Making a Compound Lens with LensSurface

3.9 Mirrors

3.9.1 The Simple Mirror
3.9.2 The Parabolic Mirror
3.9.3 The Polygonal Mirror
3.9.4 The Reflection Generic Building Block

3.10 Paraxial Optics

3.10.1 Using ThinLens
3.10.2 Using ThickLens
3.10.3 Using ABCDOptic
3.10.4 The ABCDMatrix Generic Building Block

3.11 Pipe

3.12 Prisms

3.12.1 The Simple Prism
3.12.2 The Dove Prism
3.12.3 The Mirrored Dove Prism

3.13 Screens

3.13.1 The Transmission Generic Building Block

3.14 Building with Generic Building Blocks

3.14.1 Defining Screen
3.14.2 Defining Baffle
3.14.3 Defining BaffleWithHole

3.15 Using Fresnel

Introduction to Chapter 3

This chapter provides you with a tour of LensLab's built-in component functions, which are listed in the following table.  In Chapter 5, you can learn how to create your own component functions using generic building blocks.

ABCDOptic                CylindricalBaffle           PlanoConcaveCylindricalLens
                         CylindricalLens             PlanoConcaveLens
Baffle                   CylindricalLensSurface      PlanoConvexCylindricalLens
BaffleSpan               CylindricalMirror           PlanoConvexLens
BaffleWithHole           CylindricalScreen           PolygonalMirror
BallLens                                             PolygonGraphic
BallMirror               DovePrism                   Prism
BeamSplitter             DovePrismMirrored
BeamSplitterCube                                     RectangleGraphic
BiConcaveCylindricalLens Fiber                       RodLens
BiConcaveLens                                        RodMirror
BiConvexCylindricalLens  GratingMirror
BiConvexLens             GratingSurface              Screen
Boundary                                             SphereGraphic
BoxGraphic               IntrinsicCylindricalSurface SphericalBaffle
BranchingSurface         IntrinsicSphericalSurface   SphericalGratingMirror
                         IntrinsicSurface            SphericalLens
CircleGraphic                                        SphericalLensSurface
ClearBoundary            LensDoublet                 SphericalMirror
ConjugateMirror          LensSurface                 SphericalScreen
CustomBaffle             LensTriplet
CustomBeamSplitter                                   ThickLens
CustomBranchingSurface   Mirror                      ThinBaffle
CustomGratingSurface     MirrorSpan                  ThinBeamSplitter
CustomIntrinsicSurface                               ThinLens
CustomLens               ParabolicLensSurface        ThinMirror
CustomLensSurface        ParabolicMirror             ThinParabolicMirror
CustomMirror             ParabolicMirrorWithHole     ThinSphericalMirror
CustomScreen             PinHole
CylinderGraphic          Pipe                        Window

Names of built-in component functions.

Go to list of topics

Loading LensLab

Make sure that the LensLab package is located either in the home directory, or on a directory path recognized by Mathematica for packages. The LensLab package is named LensLab.m and located in the LensLab directory, and the LensLab package is loaded with the following expression.

In[1]:=

Needs["LensLab`LensLab`"]

LensLab version 1.5 is now loaded.

This loading process should only take a few seconds. In addition to being loaded as a package, the LensLab.m file is formatted as a Mathematica notebook. The LensLab source code is made accessible so that you can develop new functions of your own by studying LensLab's built-in functions. This is particularly helpful when you wish to model new component ideas in LensLab. However, you should receive permission from Optica Software before distributing any user-created functions that are derived from the LensLab source code. The unauthorized distribution of LensLab-derived code may be a LensLab license agreement violation or a copyright infringement.

Go to list of topics

3.1 Absorbers, Pinholes, and Slits

In this section, we examine absorbers, pinholes, and slits more closely. Here are definitions for LensLab's built-in absorbers, pinholes, and slits.

Baffle[aperture, thickness, options] designates a planar, double-surfaced component having two absorbing sides.

BaffleSpan[{x1, y1}, {x2, y2}, thickness, height, options] is similar to the Baffle except that its size and placement are specified by the two two-dimensional coordinates {x1,y1} and {x2,y2}.

BaffleWithHole[aperture, holeaperture, thickness, options] signifies a thick planar component with a hole created in its middle.

CustomBaffle[surfacefunction, aperture, objectlabel, options] refers to a single-surfaced, light absorbing component having a user-defined surface, and a user-named objectlabel.

CylindricalBaffle[radius, aperture, options] refers to a cylindrical, single-surfaced component that absorbs light.

PinHole[aperture, holeaperture, options] denotes a thin planar component with a hole created in its middle.

SphericalBaffle[radius, aperture, options] refers to a spherical, single-surfaced component that absorbs light.

ThinBaffle[aperture, options] designates a planar, single-surfaced component that absorbs light.

Component functions for absorber, pinholes, and slits.

For the remainder of this section, we look at some examples using pinholes and slits.

Go to list of topics

3.1.1 Using PinHole

We next use PinHole in an example. Here we use GraphicDesign -> Solid for solid rendering of PlanoConvexLens.

In[2]:=

sys = DrawSystem[{
    CircleOfRays[20, NumberOfRays->6],
    Move[PlanoConvexLens[100,50,10, GraphicDesign->Solid],100],
    Move[PinHole[10,1],198],
    Boundary[{0,-100,-100},{250,100,100}]}];

[Graphics:HTMLFiles/chapter3_2.gif]

We look at the pinhole surface with PlotType -> Surface. From this we can see how closely the rays come to hitting the hole edges.

In[3]:=

ShowSystem[sys, PlotType->Surface, RayChoice->{ComponentNumber->2}];

[Graphics:HTMLFiles/chapter3_3.gif]

We use the function FindSpotSize to get a quantitative measurement of the ray-bundle diameter at the pinhole entrance.

FindSpotSize[objectset, selectionproperties, options] takes an objectset containing Ray objects, and returns the diameter and position of a circle enclosing the locus of ray/surface intersection points that share the common set of traits specified in selectionproperties.

In[4]:=

FindSpotSize[sys,{ComponentNumber->2}]

Out[4]=

RowBox[{{, RowBox[{RowBox[{SpotSize, , 0.903058}], ,, RowBox[{SpotPosition, ,  ... 2754; {0, 0}, ,, RowBox[{TiltVector, , RowBox[{{, RowBox[{1., ,, 0., ,, 0.}], }}]}]}], }}]

If we assume the units to be in millimeters for the optical system parameters, we see here that the bundle of rays has the diameter of .89 mm.

Go to list of topics

3.1.2 Making a Slit with PinHole

Next, we make a slit using PinHole with rectangular hole dimensions.

In[5]:=

DrawSystem[{
    CircleOfRays[20,NumberOfRays->8],
    Move[PinHole[{25,30},{1,25}],20],
    Boundary[50]}];

[Graphics:HTMLFiles/chapter3_5.gif]

Go to list of topics

3.1.3 The Absorption Generic Building Block

All of LensLab's built-in baffles use the Absorption generic building block to create absorptive ray-tracing functions. Here we define Absorption.

Absorption[component, options] is a generic building block that creates a ray-tracing function to absorb the intensity of rays hitting the optical surface.

You can use Absorption for building new types of absorbers. See Chapter 5 for more information about generic building blocks.

Go to list of topics

3.2 BeamSplitters

In this section, we examine beam splitters more closely. Here are definitions for LensLab's built-in beam splitters.

BeamSplitter[{percentreflected, percenttransmitted}, aperture, thickness, options] signifies a planar, double-surfaced component having a partially reflective/refractive side and a refractive side.

BeamSplitterCube[{percentreflected, percenttransmitted}, side, options] refers to a solid cube beam splitter having a partially reflective/refractive surface across its diagonal.

CustomBeamSplitter[
surfacefunction, {percentreflected, percenttransmitted}, aperture, objectlabel, options] denotes a single-surfaced component that partially reflects and partially transmits rays of light, having a user-defined surface, and a user-named objectlabel.

ThinBeamSplitter[{percentreflected, percenttransmitted}, aperture, options] designates a planar, single-surfaced component that partially reflects and partially transmits rays of light.

Component functions for beam splitters.

For the remainder of this section, we look at some examples using beam splitters.

Go to list of topics

3.2.1 Using BeamSplitter

Here is an example using BeamSplitter. Also introduced by this example is PlotType -> ShadowProject. Be forewarned that the option ShadowProject takes a very long time to render. However, the results can be worthwhile.

In[6]:=

DrawSystem[{
    ConeOfRays[10,NumberOfRays->10],
    Move[PlanoConvexLens[100,50,10, CurvatureDirection -> Back, GraphicDesign->Wire],100],
    Move[PlanoConvexCylindricalLens[100, {50, 50},10, GraphicDesign->Wire],130],
    Move[BeamSplitter[{50,50},{50,50},10, GraphicDesign->Wire],180,45],
    Boundary[{-100,-100,-100},{250,100,200}]},
    PlotType->ShadowProject];

[Graphics:HTMLFiles/chapter3_6.gif]

Go to list of topics

3.2.2 Using BeamSplitterCube

Next we use BeamSplitterCube in two examples.  In the first, we use BeamSplitterCube with WedgeOfRays in a simple beam-splitting operation.

In[7]:=

DrawSystem[
    {WedgeOfRays[30, NumberOfRays->6],
    Move[BeamSplitterCube[{50,50},100],10],
    Boundary[200]},Boxed->False];

[Graphics:HTMLFiles/chapter3_7.gif]

In[8]:=

ShowSystem[%,PlotType->TopView];

[Graphics:HTMLFiles/chapter3_8.gif]

In this second example, we test the ability of BeamSplitterCube to handle multisurface reflections.

In[66]:=

DrawSystem[
    {Move[WedgeOfRays[45, NumberOfRays->6],{0,-30},45],
    Move[BeamSplitterCube[{50,50},100],10],
    Boundary[200]},PlotType->TopView];

[Graphics:HTMLFiles/chapter3_9.gif]

You can learn how to build new components by studying LensLab's built-in component definitions, like BeamSplitterCube, from the LensLab package. This is discussed in more detail in Chapter 5.

Go to list of topics

3.3 Boundaries

In this section, we examine boundaries more closely. Boundaries are important for delineating bounds of the ray-trace system volume. For this reason, ray-trace systems usually have at least one boundary component listed at the end. These boundary components are not graphically rendered. Here are definitions for LensLab's built-in boundary components.

Boundary[boundaryparameters] signifies a rectangular box that absorbs rays intercepted by its walls.

ClearBoundary[boundaryparameters] refers to a rectangular box that terminates rays intercepted by its walls.

Boundary works by absorbing the intensity of rays that penetrate its surfaces. ClearBoundary, however, stops rays only when it is the last component listed for the system. ClearBoundary does not set the value of Intensity to zero, and therefore is useful for defining modular optical subunits to be pieced into a larger system.

There are three methods for specifying boundaryparameters:
Boundary[{x1, y1, z1}, {x2, y2, z2}] uses the coordinates of top and bottom opposite corners of a rectangular box, Boundary[side] assumes a cube boundary, and Boundary[xside, yside] assumes a three-dimensional box having a length specified by xside, a width specified by yside, and a height specified by yside.

If a boundary component is not given for a ray-trace system, each ray is terminated automatically at its last viable surface intersection point.

Go to list of topics

3.4 Fiber

Fiber was developed in order to model a stepped index optical fiber. Here we define Fiber.

Fiber[corediameter, claddingdiameter, length, options] designates a stepped index optical fiber.

As an example, we first render an optical fiber in three dimensions.

In[10]:=

DrawSystem[Fiber[5,10,100],Boxed->False];

[Graphics:HTMLFiles/chapter3_10.gif]

Fiber is created with an end centered about x = 0 and with its length oriented along the x axis. The refractive core and cladding materials are given by the option, ComponentMedium -> {corematerial, claddingmaterial}. Section 6.6 shows how to create new refractive material models. For more information about the refractive index options, see Section 6.9. Next we trace a wedge of rays through the optical fiber.

In[11]:=

DrawSystem[{WedgeOfRays[10, NumberOfRays->6],
    Move[Fiber[5,10,100],{5,0,0}],
    Boundary[150]},PlotType->TopView];

[Graphics:HTMLFiles/chapter3_11.gif]

Fiber actually contains ten distinct optical surfaces. Below, we use the tenth surface to examine the ray exit points at the fiber end.

In[12]:=

ShowSystem[%,PlotType->Surface, RayChoice->{SurfaceNumber->10}];

[Graphics:HTMLFiles/chapter3_12.gif]

You can learn about creating new optical fiber designs in Section 5.4.

Go to list of topics

3.5 Graphic Shapes

LensLab has a number of built-in component functions that define graphic shapes for rendering. These graphical objects cannot directly interact with rays, but are useful for generating blueprints and showing component mounts. Here are definitions for LensLab's built-in graphical components.

BoxGraphic[{xmin, ymin, zmin}, {xmax, ymax, zmax}, options] signifies a three-dimensional rectangular box with its diagonally opposite corners placed at {xmin, ymin, zmin} and {xmax, ymax, zmax}.

CircleGraphic[aperture, options] relates to a two-dimensional circle, ellipse, rectangle, or polygon lying in the horizontal x-y plane, depending on the designation of aperture.

CylinderGraphic[diameter, length, options] denotes a three-dimensional cylinder with one circular center placed at the origin of the coordinate system, and its length pointing down the positive x axis.

PolygonGraphic[numberofsides, diameter, options] denotes a two-dimensional equilateral polygon lying in the horizontal x-y plane with its center placed at the origin of the coordinate system.

RectangleGraphic[{xmin, ymin}, {xmax,ymax}, options] designates a two-dimensional rectangle lying in the horizontal x-y plane with its diagonal corners placed at {xmin, ymin} and {xmax,ymax}.

SphereGraphic[diameter, options] signifies a three-dimensional sphere with its center placed at the origin of the coordinate system.

Component functions for generating graphic shapes.

Next we use abstract graphic shapes in two examples.

Go to list of topics

3.5.1 Making Three-Dimensional Abstract Graphics

In this example we produce abstract graphical objects in space using graphical shape components.

In[13]:=

DrawSystem[{
    BoxGraphic[{0,0,0},{200,100,30}],
    Move[CylinderGraphic[100,100],{100,100}],
    SphereGraphic[150,GraphicDesign->Solid]}, Boxed->False];

[Graphics:HTMLFiles/chapter3_13.gif]

Go to list of topics

3.5.2 Making an Arbitrary Polygon Graphic Shape

Although PolygonGraphic is useful for rendering regular-sided polygons, you can use CircleGraphic to generate arbitrary polygonal shapes by indicating the polygon corners as a list of coordinates in the aperture parameter. This can be useful in constructing blueprints. Here we use CircleGraphic to render a horizontal,  four-sided shape in space.

In[14]:=

DrawSystem[CircleGraphic[{{-100,-100},{-100,100}, {-50,50},{0,100}}], PlotType->TopView];

[Graphics:HTMLFiles/chapter3_14.gif]

You can learn more about specifying aperture shapes for components in Section 6.8.

Go to list of topics

3.6 Gratings

LensLab supports a number of grating components for modeling diffraction at a surface. If we assume that each ray represents a wave vector having a direction and phase, then each ray diffracts at a grating surface according to the value of the three-dimensional grating vector at each surface point. Here are definitions for LensLab's built-in grating components.

CustomGratingSurface[surfacefunction, gratingfunction, aperture, objectlabel, options] refers to a diffractive component that splits incoming rays into multiple diffracted orders according to the gratingfunction parameter and the DiffractedOrders option.

GratingMirror[gratingfunction, aperture, options] denotes a planar, diffractive, reflective component that splits incoming rays into multiple diffracted, reflected orders according to the gratingfunction parameter and the DiffractedOrders option.

GratingSurface[gratingfunction, aperture, options] designates a planar, diffractive component that splits incoming rays into multiple diffracted orders according to the gratingfunction parameter and the DiffractedOrders option.

SphericalGratingMirror[radius, gratingfunction, aperture, options] signifies a spherical, diffractive, reflective component that splits incoming rays into multiple diffracted, reflected orders according to the gratingfunction parameter and the DiffractedOrders option.

Component functions for modeling gratings.

In some cases, several diffracted rays are created for the different diffracted orders present. The surface grating may be represented either as a function of the surface coordinates or as a constant across the surface. Note that the physical curvature of the surface does not change the directions of the defined grating vector function. Instead, the grating vector function stays fixed in its directions, regardless of the underlying surface shape. For the remainder of this section, we look at some examples using gratings.

Go to list of topics

3.6.1 Using GratingSurface

An important grating component function is GratingSurface.

Here we use GratingSurface having a horizontal grating frequency of 1500 line pairs per millimeter.

In[15]:=

simplediffraction =
DrawSystem[{
    Ray[],
    Move[GratingSurface[1500,{100,100}],50],
    Boundary[{-100,-100,-100},{100,100,100}]},PlotType->TopView];

[Graphics:HTMLFiles/chapter3_15.gif]

Go to list of topics

3.6.1 The DiffractionMismatch Parameter

The ray parameter DiffractionMismatch provides a measure of the ray's diffraction efficiency.

DiffractionMismatch is a rule of Ray returned by diffractive components that indicates the mismatch fraction of the diffracted ray and is defined as the difference in magnitude between the incident wave vector and the diffracted wave vector divided by the magnitude of the incident wave vector.

Here we check the efficiency of the last example.

In[16]:=

ReadRays[
    simplediffraction,
    DiffractionMismatch,
    IntersectionNumber->2]

Out[16]=

RowBox[{{, RowBox[{0, ,, 0.27894}], }}]

Note that DiffractionMatch is placed in the Ray objects created from the diffraction surface interaction and therefore is only present in the following generation of Ray objects, for instance, IntersectionNumber -> 2.

Go to list of topics

3.6.3 Using GratingMirror

Next we use GratingMirror. GratingMirror works the same as GratingSurface, except that it has a reflective backing.

In[17]:=

DrawSystem[{
    Ray[],
    Move[GratingMirror[1500,{100,100}],50,30],
    Boundary[{-100,-100,-100},{100,100,100}]},PlotType->TopView];

[Graphics:HTMLFiles/chapter3_17.gif]

Go to list of topics

3.6.4 Using SphericalGratingMirror

Gratings can also be put onto curved surfaces. Keep in mind, however, that the built-in grating function has a fixed direction that is formed independently of the surface contour. This is similar to the holographic interference of two plane waves on an arbitrary surface. Other grating functions may be defined by the user. Here we use SphericalGratingMirror.

In[18]:=

DrawSystem[{
    LineOfRays[75, NumberOfRays->6],
    Move[SphericalGratingMirror[-200, 500, 100],100],
    Boundary[{-100,-100,-100},{100,100,100}]},PlotType->TopView];

[Graphics:HTMLFiles/chapter3_18.gif]

Go to list of topics

3.6.5 The DiffractionOrderNumber Parameter

The ray parameter DiffractionOrderNumber may be used to follow the graphical path of a single diffracted order.

DiffractionOrderNumber is a rule of Ray returned by diffractive components that indicates the order number of the particular diffracted ray.

Working with the last example, we restrict the display of rays to the first diffracted order.

In[19]:=

ShowSystem[%,PlotType->TopView, RayChoice->{DiffractionOrderNumber->0}];

[Graphics:HTMLFiles/chapter3_19.gif]

Go to list of topics

3.6.6 Creating a Bragg Grating

In the previous cases, a simple horizontal grating vector was used to produce a horizontal diffraction that has a zero-order and a first-order diffracted beam. Here we create a Bragg diffraction grating used in a dielectric mirror or reflection hologram by changing the direction of the grating vector and increasing its spatial frequency.

In[20]:=

DrawSystem[{
    Ray[],
    Move[GratingSurface[{-3000,1000,0},{100,100},DiffractedOrders->{{1,1}}],50],
    Boundary[{-100,-100,-100},{100,100,100}]},PlotType->TopView];

[Graphics:HTMLFiles/chapter3_20.gif]

In addition to making a Bragg diffracter, we have suppressed the zero-order beam by setting the option DiffractedOrders -> {{1,1}}.

Go to list of topics

3.6.7 Diffracting Several Colors

Next, we can see how a polychromatic ray diffracts through the first-examined grating structure.

In[21]:=

DrawSystem[{
    RainbowOfRays[{.4,.7}, NumberOfRays->6],
    Move[GratingSurface[1500,{100,100}],50],
    Boundary[{-100,-100,-100},{100,100,100}]},PlotType->TopView];

[Graphics:HTMLFiles/chapter3_21.gif]

As another example, we will present a more complicated grating system that has several diffracted orders, accomplished by changing the DiffractedOrders option; it is also tilted relative to the incoming polychromatic beam.

In[22]:=

DrawSystem[{
    RainbowOfRays[{.4,.7}, NumberOfRays->6],
    Move[GratingSurface[1000,{100,100},DiffractedOrders->{{-1,1},{0,1},{1,1},{2,1}}],50,45],
    Boundary[{-100,-100,-100},{100,100,100}]},PlotType->TopView];

[Graphics:HTMLFiles/chapter3_22.gif]

Go to list of topics

3.6.8 The Diffraction Generic Building Block

Note that GratingSurface does not incorporate effects due to refraction or reflection, and only uses planar surfaces. Other variations, however, are simple to implement by using Diffraction, the parent generic function of GratingSurface, in combination with other object forms and generic building blocks. All of LensLab's built-in gratings use the Diffraction generic building block to create diffractive ray-tracing functions. Here we define Diffraction.

Diffraction[component, gratingfunction, options] is a generic building block that uses DeflectionFunction[ Diffraction, {diffractionvariables}] to produce diffracted rays through optical surfaces according to the gratingfunction parameter and the DiffractedOrders option.

You can use Diffraction for building new types of gratings. See Chapter 5 for more information about generic building blocks.

Go to list of topics

3.7 Lenses

In this section, we define LensLab's built-in lens functions. Due to the large numbers of lens functions, the definitions are grouped as spherical lenses, cylindrical lenses, the custom lens, and the window.

Go to list of topics

3.7.1 Spherical Lenses

BallLens[diameter, options] refers to an entire spherical refractive component.

BiConcaveLens[focallength, aperture, thickness, options] has two equally concave spherical surfaces.

BiConvexLens[focallength, aperture, thickness, options] has two equally convex spherical surfaces.

LensDoublet[r1, r2, r3, aperture, t1, t2, index1, index2, options] has three spherical surfaces.

LensTriplet[r1, r2, r3, r4, aperture, t1, t2, index1, index2, index3, options] has four spherical surfaces.

PlanoConcaveLens[focallength, aperture, thickness, options] has a planar surface on one side and a concave spherical surface on the other side.

PlanoConvexLens[ focallength, aperture, thickness, options] has a planar surface on one side and a convex spherical surface on the other side.

SphericalLens[r1, r2, aperture, thickness, objectlabel, options] has spherical surfaces given by two radii of curvatures.

Component functions for generating spherical lenses.

Go to list of topics

3.7.2 Cylindrical Lenses

BiConcaveCylindricalLens[focallength, aperture, thickness, options] has two equally concave cylindrical surfaces.

BiConvexCylindricalLens[focallength, aperture, thickness, options] has two equally convex cylindrical surfaces.

CylindricalLens[r1, r2, aperture, thickness, label, options] has cylindrical surfaces given by two radii of curvatures.

PlanoConcaveCylindricalLens[focallength, aperture, thickness, options] has a planar surface on one side and a concave cylindrical surface on the other side.

PlanoConvexCylindricalLens[focallength, aperture, thickness, options] has a planar surface on one side and a convex cylindrical surface on the other side.

RodLens[diameter, length, options] denotes an entire cylindrical refractive surface.

Component functions for generating cylindrical lenses.

Go to list of topics

3.7.3 CustomLens

CustomLens[f1, f2, aperture, thickness, objectlabel, options] has user-defined surfaces and a user-named objectlabel.

Go to list of topics

3.7.4 Window

Window[aperture, thickness, options] designates a planar, refractive component having a specified thickness.

Go to list of topics

3.7.5 The DesignWaveLength Option

DesignWaveLength is an option of most built-in lens functions that indicates the design wavelength value used in calculating the lens curvatures from the focal length specified.

Go to list of topics

3.7.6 Light through a Glass Ball

We now use BallLens in an example.

In[23]:=

ballsys = DrawSystem[{
    LineOfRays[95,NumberOfRays->10],
    Move[BallLens[100, SurfaceRendering -> {Empty,Fill,Fill,Fill}, GraphicDesign->Solid],50],
    Boundary[{-100,-50,-100},{200,50,100}]}, Boxed->False];

[Graphics:HTMLFiles/chapter3_23.gif]

Here we see the intersection points on the first lens surface.

In[24]:=

ShowSystem[%,PlotType->Surface, RayChoice->{IntersectionNumber -> 1}];

[Graphics:HTMLFiles/chapter3_24.gif]

Go to list of topics

3.7.7 The Refraction Generic Building Block

All of LensLab's built-in lenses and prisms use the Refraction generic building block to create refractive ray-tracing functions. Here we define Refraction.

Refraction[component, options] is a generic building block that uses DeflectionFunction[ Refraction, {refractionvariables}] to produce refracted rays through optical surfaces.

You can use Refraction for building new types of lenses and prisms. See Chapter 5 for more information about generic building blocks.

Go to list of topics

3.8 LensSurface Functions

The LensSurface components are used to build up more complex lenses or prism-like refractive components. Here are definitions for the built-in LensSurface component functions.

CustomLensSurface[surfacefunction, aperture, objectlabel, options] indicates a user-defined surface that models the refractive index boundary at a lens surface, and a user-named objectlabel.

CylindricalLensSurface[
radius, aperture, options] refers to a half cylinder that models the refractive index boundary at a lens surface.

LensSurface[
aperture, options] denotes a planar component that models the refractive index boundary at a lens surface.

ParabolicLensSurface[
focus, aperture, options] designates a spherical component, having a given radius of curvature, that models the refractive index boundary at a lens surface.

SphericalLensSurface[
radius, aperture, options] designates a spherical component, having a given radius of curvature, that models the refractive index boundary at a lens surface.

Component functions for generating lens surfaces.

LensSurface components are always used in combination with one or more additional LensSurface component types to create a complete lens object. Next we look at an example using LensSurface components. Additional examples are shown in Section 5.4.

Go to list of topics

3.8.1 Making a Hybrid Lens with LensSurface

In this example, we use SphericalLensSurface in combination with CylindricalLensSurface to model a lens having a spherical side and a cylindrical side. Here we use the Resonate generic building block to create a single Component object that is labeled as HybridLens. You can learn more about Resonate in Chapter 5.

In[25]:=

hybridlens =
Resonate[
    {SphericalLensSurface[75,50,GraphicDesign->Wire],
    Move[CylindricalLensSurface[-75,50, GraphicDesign->Wire],15]}, "HybridLens"]

Out[25]=

HybridLens

First we plot the new lens by itself.

In[26]:=

DrawSystem[hybridlens];

[Graphics:HTMLFiles/chapter3_26.gif]

Finally, we trace a grid of rays through the lens.

In[27]:=

DrawSystem[{GridOfRays[45, NumberOfRays->6],
    Move[hybridlens,50],Boundary[200]}];

[Graphics:HTMLFiles/chapter3_27.gif]

As alternative methods, we can model the same lens by using either the SphericalLens function or the CustomLens function with SurfaceLabel -> {SphericalShape,CylindricalShape}. Here we use CustomLens for modeling the hybrid lens.

In[28]:=

DrawSystem[CustomLens[75,-75,50,15, "HybridLens", SurfaceLabel->{SphericalShape,CylindricalShape}]];

[Graphics:HTMLFiles/chapter3_28.gif]

Go to list of topics

3.8.2 Making a Compound Lens with LensSurface

You can use the built-in LensDoublet and LensTriplet component functions to model spherical lens doublets and triplets. However, in some cases it may be necessary to use nonspherical surfaces within a compound lens structure. In this example, we model a compound lens of two glass materials having a spherical interface with parabolic and planar exteriors. As in the last example, we use Resonate to form a single Component structure from three component functions. This permits the rays to travel nonsequentially between the lens surfaces. This time we specify the refractive material at each lens boundary using the ComponentMedium option. In addition, we specify two refractive materials in ComponentMedium for the middle boundary. See Section 6.9 for further discussion about specifying the refractive index of materials.

In[29]:=

compoundlens =
Resonate[{
    ParabolicLensSurface[-30,50,GraphicDesign->Wire, ComponentMedium->BK7],
    Move[SphericalLensSurface[100,50,GraphicDesign->Wire, ComponentMedium->{BK7,SF11}],15],
    Move[LensSurface[50,GraphicDesign->Wire, ComponentMedium->SF11],25]},
    "CompoundLens"]

Out[29]=

CompoundLens

First we plot the compound lens by itself.

In[30]:=

DrawSystem[compoundlens];

[Graphics:HTMLFiles/chapter3_30.gif]

Finally, we trace a line of rays through the compound lens.

In[31]:=

DrawSystem[{LineOfRays[45, NumberOfRays->6], Move[compoundlens,10],Boundary[125]},PlotType->TopView];

[Graphics:HTMLFiles/chapter3_31.gif]

Go to list of topics

3.9 Mirrors

In this section, we examine mirrors more closely. Here are definitions for LensLab's built-in mirrors.

BallMirror[radius, options] signifies an entire spherical mirror.

ConjugateMirror[aperture, thickness, options] refers to a planar, phase-conjugate mirror.

CustomMirror[surfacefunction, aperture, objectlabel, options] denotes a mirror having a user-defined surface, and a user-named objectlabel.

CylindricalMirror[radius, aperture, options] designates a cylindrical mirror.

Mirror[aperture, thickness, options] signifies a planar, double-surfaced mirror having a reflective side and a refractive side.

MirrorSpan[{x1,y1}, {x2,y2}, thickness, height, options] is similar to Mirror except that its size and placement is specified by the two two-dimensional coordinates {x1,y1} and {x2,y2}.

ParabolicMirror[focallength, aperture, thickness, options] refers to a double-surfaced mirror having a parabolic reflective side and a planar, refractive side.

ParabolicMirrorWithHole[
focallength, aperture, holeaperture, thickness, options] denotes a double-surfaced mirror having a parabolic reflective side and a planar, refractive side, with a hole cut in its center.

PolygonalMirror[numberofsides, diameter, height, options] designates a  polygonal mirror having radial symmetry and vertical surfaces.

Component functions for generating mirrors, part one.

RodMirror[diameter, length, options] signifies an entire cylindrical mirror.

SphericalMirror[radius, aperture, thickness, options] refers to a double-surfaced mirror having a spherical reflective side and a planar, refractive side.

ThinMirror[aperture, options] denotes a planar mirror.

ThinParabolicMirror[radius, aperture, options] denotes a spherical mirror.

ThinSphericalMirror[radius, aperture, options] refers to a spherical mirror

Component functions for generating mirrors, part two.

For the remainder of this section, we look at some examples using mirrors.

Go to list of topics

3.9.1 The Simple Mirror

In this section, we will use Mirror in two examples. First we use a front-surfaced mirror.

In[32]:=

DrawSystem[{
    Ray[],
    Move[Mirror[{100,100},10],100,70],
    Boundary[{0,-50,-50},{200,50,50}]},
    PlotType->TopView];

[Graphics:HTMLFiles/chapter3_32.gif]

Next we use a back-surfaced mirror. The back-surfaced mirror is made with the option FrontSurfaced->False. Normally, LensLab assumes the option FrontSurfaced->True, using a simpler model for Mirror that does not incorporate refractive effects.

In[33]:=

DrawSystem[{
    Ray[],
    Move[Mirror[{100,100},10,FrontSurface->False], 100,70],
    Boundary[{0,-50,-50},{200,50,50}]},
    PlotType->TopView];

[Graphics:HTMLFiles/chapter3_33.gif]

Go to list of topics

3.9.2 The Parabolic Mirror

We will now use parabolic mirrors in two examples.

In[34]:=

DrawSystem[{
    Move[CircleOfRays[20,NumberOfRays->5],0,180],
    Move[ParabolicMirror[100,100,20],-50,180],
    Boundary[{-100,-100,-100},{100,100,100}]}];

[Graphics:HTMLFiles/chapter3_34.gif]

In[35]:=

ShowSystem[%,PlotType->TopView];

[Graphics:HTMLFiles/chapter3_35.gif]

We use OffAxis -> {100,0} to create an off-axis parabolic mirror.

In[36]:=

DrawSystem[{
    Move[CircleOfRays[30,NumberOfRays->5], {0,-100}, 180],
    Move[ParabolicMirror[100,100,10,OffAxis->{100,0}], {-50,0}, 180],
    Boundary[{-150,-150,-100},{100,100,100}]}];

[Graphics:HTMLFiles/chapter3_36.gif]

Go to list of topics

3.9.3 The Polygonal Mirror

Next we use PolygonalMirror in an example to create an animation of mirror rotations. We use the mirror symmetry to magnify the number of animation frames.

In[37]:=

poly = PolygonalMirror[10,100,50,GraphicDesign->Solid];
Do[    DrawSystem[{
        Move[WedgeOfRays[30, NumberOfRays->6],-150],
        Move[poly,0,angle],
        Boundary[{-150,-100,-100},{50,100,100}]
        },PlotType->TopView,
    PlotRange->{{-150,50},{-100,100}}],
{angle,0.,N[(1. - 1./15.) 36.],N[36./15.]}];

[Graphics:HTMLFiles/chapter3_52.gif]

Go to list of topics

3.9.4 The Reflection Generic Building Block

Most of LensLab's built-in mirrors use the Reflection generic building block to create reflective ray-tracing functions. Here we define Reflection.

Reflection[component, options] is a generic building block that uses DeflectionFunction[ Reflection, {reflectionvariables}] to produce reflected rays from optical surfaces.

You can use Reflection for building new types of mirrors. See Chapter 5 for more information about generic building blocks.

Go to list of topics

3.10 Paraxial Optics

LensLab has three built-in components for performing two-dimensional, paraxial ray traces based on the ABCD matrix transformations. These are: ThinLens, ThickLens, and ABCDOptic. These functions only perform two-dimensional ray traces by ignoring ray tilts in the third dimension. In addition, only small amounts of tilt are accurately modeled using these components.

ABCDOptic[abcdmatrix, aperture, thickness, options] designates a two-surfaced planar component that scatters rays using the abcdmatrix specified with an entrance plane and an exit plane separated by the indicated thickness.

ThickLens[focallength, aperture, principleplanespacing, options] behaves as an ideal thick lens for two-dimensional and paraxial ray traces by using the ABCD matrix representations for a thick lens.

ThinLens[focallength, aperture, options] behaves as an ideal thin lens for two-dimensional and paraxial ray traces by using the ABCD matrix representation for a thin lens.

For the remainder of this section, we look at some examples using paraxial components.

Go to list of topics

3.10.1 Using ThinLens

ThinLens is used in the following example.

In[39]:=

DrawSystem[{
    LineOfRays[45, NumberOfRays->6],
    Move[ThinLens[100,50],50],
    Boundary[{-100,-100,-100},{200,100,100}]},
    PlotType->TopView];

[Graphics:HTMLFiles/chapter3_53.gif]

ThinLens only works in two dimensions while behaving like a cylindrical lens in three dimensions.

In[40]:=

DrawSystem[{
    CircleOfRays[45, NumberOfRays->6],
    Move[ThinLens[100,50],50],
    Boundary[{-100,-100,-100},{200,100,100}]}];

[Graphics:HTMLFiles/chapter3_54.gif]

Go to list of topics

3.10.2 Using ThickLens

In the following example of ThickLens, the two principle planes are presented in the ray-tracing result.

In[41]:=

DrawSystem[{
    WedgeOfRays[25, NumberOfRays->6],
    Move[ThickLens[50,60,20],100],
    Boundary[{-100,-100,-100},{250,100,100}]},
    PlotType->TopView];
    

[Graphics:HTMLFiles/chapter3_55.gif]

Next we show the ray trace through the component described by PlanoConvexLens superimposed with a ray trace through the component described by its ThickLens representation. Notice that the outer traces do not overlap well, since the paraxial approximation is violated in that region.

In[43]:=

DrawSystem[{
    LineOfRays[45, NumberOfRays->6],
    Move[PlanoConvexLens[100,52,9.9],50],
    Boundary[{-100,-100,-100},{200,100,100}],
    LineOfRays[45],
    Move[ThickLens[100,52,9.9-6.5],50],
    Boundary[{-100,-100,-100},{200,100,100}]},
    PlotType->TopView];

[Graphics:HTMLFiles/chapter3_56.gif]

Go to list of topics

3.10.3 Using ABCDOptic

ABCDOptic is useful for modeling objects such as optical fibers and graded-index lenses. We now define the ABCD matrix function T, for a continuous, lens-like medium.

In[44]:=

T[d_,l_] = {{Cos[d/l],l*Sin[d/l]},{-Sin[d/l]/l,Cos[d/l]}};

Here l is a scale factor that indicates how fast the refractive index varies with the radius, and d is the length of Component. The refraction effects of the air-interface are not included in this matrix model, but can easily be incorporated. Here we use ABCDOptic to model a graded-index lens.

In[45]:=

DrawSystem[{
    LineOfRays[45, NumberOfRays->6],
    Move[ABCDOptic[T[500.,100.],50.,500.],50],
    Boundary[{-100,-100,-100},{750,100,100}]},
    PlotType->TopView];

[Graphics:HTMLFiles/chapter3_57.gif]

Further information about paraxial ray tracing can be found either in Laser Electronics by Joseph T. Verdeyen (Prentice-Hall, 1989) or in the HandBook of Optics (Optical Society of America, 1990).

Go to list of topics

3.10.4 The ABCDMatrix Generic Building Block

All of LensLab's built-in paraxial components use the ABCDMatrix generic building block to create paraxial ray-tracing functions. Here we define ABCDMatrix.

ABCDMatrix[component, {{a,b},{c,d}}, options] is a generic building block that uses DeflectionFunction[ ABCDMatrix, {{a,b},{c,d}}, {functionvariables}] to produce scattered rays according to the ABCD matrix law.

You can use ABCDMatrix for building new types of paraxial components. See Chapter 5 for more information about generic building blocks.

Go to list of topics

3.11 Pipe

Pipe was developed in order to model the refractive properties of a transparent hollow pipe filled with a liquid. Here we define Pipe.

Pipe[outerdiameter, wallthickness, height, options] signifies a cylindrical component having a given diameter and wall thickness that models the optical properties of a transparent, thick-walled cylinder.

The refractive index of the pipe walls are given by the ComponentMedium option. Pipe is created with its center located at the origin of the coordinate system, and having its length (height) oriented vertically.

For the remainder of this section, we look at some examples using components described by Pipe. First we model a cylindrical pipe filled with air.

In[46]:=

DrawSystem[{
    LineOfRays[50, NumberOfRays->6],
    Move[Pipe[75,5,100],50],
    Boundary[{-100,-100,-100},{150,100,100}]},
    PlotType->TopView,PlotPoints->30];

[Graphics:HTMLFiles/chapter3_58.gif]

Pipe may be filled with an index medium other than air by having the interior intrinsic index of refraction given by the option InsideMedium. Next we fill the pipe interior with water using InsideMedium -> Water.

In[47]:=

DrawSystem[{
    LineOfRays[50, NumberOfRays->6],
    Move[Pipe[75,5,100,InsideMedium->Water],50],
    Boundary[{-100,-100,-100},{150,100,100}]},
    PlotType->TopView,PlotPoints->30];

[Graphics:HTMLFiles/chapter3_59.gif]

Here is a three-dimensional view.

In[48]:=

ShowSystem[%];

[Graphics:HTMLFiles/chapter3_60.gif]

You can put ray sources and components inside Pipe by listing the objects in front of the Pipe function. Here we locate a wedge of rays and a planoconvex lens inside the pipe.

In[49]:=

DrawSystem[{
    WedgeOfRays[20, NumberOfRays->6],
    Move[BiConvexLens[40,25,6],35],
    Move[Pipe[75,5,100],20],
    Boundary[100]},
    PlotType->TopView,PlotPoints->30];

[Graphics:HTMLFiles/chapter3_61.gif]

Again we fill the pipe interior with water using InsideMedium -> Water, keeping the light source in the pipe center. We must use a matching IntrinsicMedium with each interior light source.

In[50]:=

DrawSystem[{
    WedgeOfRays[20,IntrinsicMedium->Water, NumberOfRays->6],
    Move[BiConvexLens[40,25,6],{35,0,0}],
    Move[Pipe[75,5,100,InsideMedium -> Water],20],
    Boundary[100]},
    PlotType->TopView,PlotPoints->30];

[Graphics:HTMLFiles/chapter3_62.gif]

Go to list of topics

3.12 Prisms

In this section, we examine prisms more closely. Here are definitions for LensLab's built-in prisms.

DovePrism[width, slantlength, length, options] refers to a six-sided prism component having trapezoidal dimensions on two sides and rectangular dimensions on the remaining sides.

DovePrismMirrored[width, slantlength, length, options] is identical to the DovePrism component with the addition of a mirrored surface on the hypotenuse face.

Prism[{alpha, side, beta}, height, options] denotes a triangular refractive prism component specified by two angles, alpha and beta, a side between the two angles, and a height.

The following examples show ray tracing through various prism geometries.

Go to list of topics

3.12.1 The Simple Prism

Here we use Prism in several examples. Each example uses Prism in a different orientation. First we send the rays through the side of the prism.

In[51]:=

DrawSystem[{
    WedgeOfRays[10, NumberOfRays->6],
    Move[Prism[{60,135,60},100],{300,-60}],
    Boundary[{-110,-250,-250},{850,250,250}]}];

[Graphics:HTMLFiles/chapter3_63.gif]

In[52]:=

ShowSystem[%,PlotType->TopView];

[Graphics:HTMLFiles/chapter3_64.gif]

Then we send the rays through the apex of the prism.

In[53]:=

DrawSystem[{
    WedgeOfRays[10, NumberOfRays->6],
    Move[Prism[{60,135,60},100],{300,-30},-30],
    Boundary[{-110,-250,-250},{850,250,250}]}, PlotType->TopView];

[Graphics:HTMLFiles/chapter3_65.gif]

Finally, we send the rays opposite the prism apex.

In[54]:=

DrawSystem[{
    WedgeOfRays[20, NumberOfRays->6],
    Move[Prism[{60,135,60},100],{300,-30},30],
    Boundary[{-110,-250,-250},{500,250,250}]}, PlotType->TopView];

[Graphics:HTMLFiles/chapter3_66.gif]

Go to list of topics

3.12.2 The Dove Prism

Next we use DovePrism for modeling dove prisms. This example is not intended to show the proper use of dove prisms but rather demonstrates LensLab's ability to carry out correct ray tracing under pressing circumstances. Here the rays are nonsequentially traced through the dove prism to produce accurate results. One particular ray interacts with seven surfaces before exiting the prism.

In[55]:=

DrawSystem[{
    ConeOfRays[45, NumberOfRays->6],
    DovePrism[6.0,8.5,25.37],
    Boundary[{-10,-25,-25},{50,25,25}]}];

[Graphics:HTMLFiles/chapter3_67.gif]

In[56]:=

ShowSystem[%,PlotType->SideView];

[Graphics:HTMLFiles/chapter3_68.gif]

In[57]:=

ShowSystem[%,PlotType->TopView];

[Graphics:HTMLFiles/chapter3_69.gif]

Go to list of topics

3.12.3 The Mirrored Dove Prism

We next use DovePrismMirrored for modeling dove prisms having a reflective face. Again, this example is not intended to show the proper use of dove prisms.

In[58]:=

DrawSystem[{
    ConeOfRays[45, NumberOfRays->6],
    DovePrismMirrored[6.0,8.5,25.37],
    Boundary[{-10,-25,-25},{50,25,25}]}];

[Graphics:HTMLFiles/chapter3_70.gif]

In[59]:=

ShowSystem[%,PlotType->SideView];

[Graphics:HTMLFiles/chapter3_71.gif]

Go to list of topics

3.13 Screens

LensLab has several built-in screen functions. Screen functions are useful for sampling surfaces within the ray-trace volume for measuring ray parameter information at the screen surface. Here are definitions for LensLab's built-in screen functions.

CustomScreen[surfacefunction, aperture, objectlabel, options] designates a component that intersects rays without disturbing them.

CylindricalScreen[radius, aperture, options] designates a cylindrical component that intersects rays without disturbing them.

Screen[
aperture, options] signifies a planar component that intersects rays without disturbing them.

SphericalScreen[radius, aperture, options] refers to a spherical component that intersects rays without disturbing them.

Built-in Screen functions.

Go to list of topics

3.13.1 The Transmission Generic Building Block

All of LensLab's built-in screens use the Transmission generic building block to create optically neutral ray-tracing functions. Here we define Transmission.

Transmission[component, options] is a generic building block that creates a ray-tracing function to pass rays through optical surfaces and preserving ray tilts.

You can use Transmission for building new types of neutral components. See Chapter 5 for more information about generic building blocks.

Go to list of topics

3.14 Building with Generic Building Blocks

Nearly all of LensLab's built-in component functions use generic building blocks in their definitions. "Generic building blocks" are functions that add characteristics to Component, and provide an easy way to create and modify optical component models. Generic building blocks work by adding new generic traits to the original traits of Component or replacing existing parameters of Component with new parameters. You can use generic building blocks to create new types of component functions. Here is a list of LensLab's built-in generic building blocks.

ABCDMatrix                      FreezeIncrement
Absorption                      Fresnel
AuthorizeNewOptions
                                Hole
BuildComponent
                                IncrementComponentNumber
ChangeSurfaceIncrement
ChangeSurfacePosition           Reflection
ComponentFoundation             Refraction
ComponentRendering              Resonate
Confine                         ReverseMigration
ConjugateReflection
CustomGeneticFunction           SwitchIntrinsicMedium

Diffraction                     Transmission

EscapeComponent                 Unconfine

Names of "generic building blocks".

In this section we examine how several built-in component functions are defined with generic building blocks. Do not evaluate these definitions, since the names are protected. The expressions can be evaluated if the definition names are changed.

Go to list of topics

3.14.1 Defining Screen

Shown below, Screen is one of the most simple built-in component functions of LensLab.

Screen[aperture_,options___] :=
    Transmission[                    
        ComponentFoundation[
            Infinite, aperture, Screen, options
        ], options];

Here we see that Screen uses two generic building blocks for its definition, namely ComponentFoundation and Transmission.  Although LensLab's built-in Screen function does contain an option for rendering, the simplified Screen function examined here contains only one surface and no rendering information at all.

ComponentFoundation[surfacevalue, aperture, objectname, options] creates a single-surfaced object foundation for building up a component.

Transmission[
component, options] is a generic building block that creates a ray-tracing function to pass rays through optical surfaces while preserving ray tilts.

ComponentFoundation is always used first in defining new component functions, creating the blank Component slate that other generic functions can write on. Transmission puts a neutral ray-tracing function into the Component object created by ComponentFoundation. This results in a single-surfaced component that intercepts and transmits rays.

Go to list of topics

3.14.2 Defining Baffle

Next we examine Baffle, whose definition is shown below. In contrast with Screen, Baffle has two surfaces and is visibly rendered.

Baffle[aperture_, thickness_, options___] :=
    Absorption[
        ComponentRendering[
            ComponentFoundation[
                {Infinite,
                Infinite},
                aperture,
                thickness,
                Baffle,
                options,
                SurfaceLabel -> PlanarShape,
            ], options
        ], options
    ];

Here you can see that Baffle uses three generic building blocks during its creation, namely ComponentFoundation, ComponentRendering, and Absorption.

ComponentFoundation[{surfacevlaue, surfacevalue}, aperture, thickness, objectname, options] creates a two-surfaced object foundation for building up a component.

ComponentRendering[component, options] creates the generic information for the rendering of a component.

Absorption[component, options] creates a ray-tracing function to absorb the intensity of rays hitting the optical surface.

Now ComponentFoundation creates the Component object with two planar surfaces. Again, ComponentFoundation must occupy the innermost nest level in the component function definition and creates the surface functions (in Surfaces of Component) as well as the confined ray-migration routes (in ConfinedPaths of Component). The next building block level, ComponentRendering, inserts the rendering information into Component. Finally, Absorption inserts the absorptive ray-tracing function into Component.

Go to list of topics

3.14.3 Defining BaffleWithHole

BaffleWithHole is a simple modification on Baffle that creates a hole through which rays can pass without being attenuated.

BaffleWithHole[aperture_,holeaperture_,
    thickness_,options___]:=

Hole[Baffle[aperture,thickness,options],
    holeaperture,options];

We see that BaffleWithHole uses the Hole generic building block. Here we define Hole.

Hole[component, holeaperture, options] is a generic building block for creating a hole within a component surface.

The holeaperture parameter specifies the hole dimensions, which can be either circular, rectangular, or polygonal. Hole also modifies the component rendering to show the hole. You can use the HoleOffset option to position the hole away from the affected surface center. In BaffleWithHole, Hole adds a new ray-tracing function that modifies the effects of Absorption in Baffle by allowing rays to pass through a hole in the two surfaces. You can use Hole to put holes in any type of component.

Before creating new components using generic building blocks, you can examine any built-in component definition by opening the LensLab package and looking in the "Component Functions" section.

Go to list of topics

3.15 Using Fresnel

You can use Fresnel to create the Fresnel version of a particular component. Here is the definition of Fresnel.

Fresnel[component, linespacing, options] is used for transforming a regular optical element into a flattened Fresnel equivalent.

The linespacing argument specifies the width of the Fresnel grooves and the groove direction is specified by the FresnelSymmetry option. FresnelSymmetry takes RadialSymmetry, HorizontalSymmetry, and VerticalSymmetry as word values. Fresnel uses the AffectedSurfaces option to specify the component surfaces affected by Fresnel. If AffectedSurfaces does not specify a number or list of numbers, Fresnel will transform all surfaces present.

First we use Fresnel to create a flattened off-axis parabolic mirror.

In[60]:=

DrawSystem[{
    Move[CircleOfRays[30,NumberOfRays->5],{0,-100},180],
    Move[Fresnel[ParabolicMirror[100,100,2,OffAxis->{100,0}],.1], -50, 180],
    Boundary[{-150,-150,-100},{100,100,100}]}];

[Graphics:HTMLFiles/chapter3_72.gif]

Here is the top view.

In[61]:=

ShowSystem[%,PlotType->TopView];

[Graphics:HTMLFiles/chapter3_73.gif]

Next we use Fresnel with PlanoConvexLens to make a flattened out planoconvex lens.

In[62]:=

DrawSystem[{
    ConeOfRays[20, NumberOfRays->6],
    Move[Fresnel[PlanoConvexLens[100,50,1],.1],100],
    Boundary[{-100,-100,-100},{200,100,100}]}];

[Graphics:HTMLFiles/chapter3_74.gif]

Although the lenses and mirrors flattened with Fresnel appear to be flat, their surfaces contain grooves that are normally too small for rendering. Here we use Fresnel with a bigger linespacing value to make an off-axis mirror with visibly rendered grooves.

In[63]:=

DrawSystem[{
    Move[LineOfRays[80,NumberOfRays->5],{0,-100},180],
    Move[ Fresnel[ ParabolicMirror[100,100,2,OffAxis->{100,0}], 25], -50, 180],
    Boundary[{-150,-150,-100},{100,100,100}]},
    PlotPoints->50,PlotType->TopView];

[Graphics:HTMLFiles/chapter3_75.gif]

Due to the curvature in the mirror's surface, the rays don't appear to exactly touch the mirror.

Go to list of topics

Copyright Statement

LensLab is a trademark of Optica Software.
Mathematica ® is a registered trademark of Wolfram Research, Inc. All other product names mentioned are trademarks of their producers. Mathematica is not associated with Mathematica Policy Research, Inc. or MathTech, Inc.
Copyright ©1995-2005 by Optica Software, Urbana, Illinois, Champaign, Illinois.

All rights reserved. No part of this document may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, without prior written permission of the author, Optica Software.

Optica Software is the holder of the copyright to the LensLab package software and documentation ("Product") described in this document, including without limitation such aspects of the Product as its code, structure, sequence, organization, "look and feel", programming language and compilation of command names. Use of the Product, unless pursuant to the terms of a license granted by Optica Software. or as otherwise authorized by law, is an infringement of the copyright.

Optica Software makes no representations, express or implied, with respect to this Product, including without limitations, any implied warranties of merchantability or fitness for a particular purpose, all of which are expressly disclaimed. Users should be aware that included in the terms and conditions under which Optica Software is willing to license the Product is a provision that the author, Optica Software and distribution licensees, distributors and dealers shall in no event be liable for any indirect, incidental or consequential damages, and that liability for direct damages shall be limited to the amount of the purchase price paid for the Product.

In addition to the foregoing, users should recognize that all complex software systems and their documentation contain errors and omissions. Optica Software shall not be responsible under any circumstances for providing information on or corrections to errors and omissions discovered at any time in this document or the package software it describes, whether or not they are aware of the errors or omissions. Optica Software does not recommend the use of the software described in this document for applications in which errors or omissions could threaten life, injury or significant loss.

Go to list of topics


Created by Mathematica  (November 4, 2005)