Optical Elements


This document describes a very preliminary package that incorporates some basic optical elements into c_shape_edit. I emphasize that this is a preliminary package and is subject to change with very little notice.

 Currently, the idea is to allow the user to do very simple optical ray casting to see if a layout of optical components is sound. Any heavy duty optical analysis will need to be done with another package (e.g., Zemax or CodeV).

 We have incorporated the notion of compound rays which may interact with optical elements. The optical elements are currently restricted to the following types:

 

In order to interact with rays, optical elements must be incorporated into optical path objects which are simple sequential arrays of optical elements.

 


Table of Contents


Ray Construction

Rays are represented as polylines which enable the representation of compound rays, e.g., a single ray that has taken a number of bounces off of mirrors.

 

ray( Pt, Vec )
Returns
<Polyline> Create a non-compound light ray.
Pt
<Point> Origin of ray.
Vec
<Vector> Direction of ray.
ray( PolylineArgs )
Returns
<Polyline> Create a compound light ray.
PolylineArgs
<Polyline> | <Points...> Gives the legs of a compound ray.

Ray Queries

For a compound ray, the starting origin is the origin for the first leg of the ray and is given by the first point of the polyline used to represent the ray. The starting direction is the direction of the first leg of the ray and is represented by a unit length vector in the direction given by the first two points of the polyline. The ending origin is the origin of the last leg of the ray and is given by the next to last point of the polyline that represents the ray. The ending direction is the direction of the last leg of the ray and is represented by a unit length vector in the direction given by the last two points of the polyline.

 

rayStartOrg( Ray )
Returns
<Point> The origin of the first leg of a ray.
Ray
<Polyline> Constructed from ray( ... ) above.
rayStartDir( Ray )
Returns
<Vector> The direction of the first leg of a ray.
Ray
<Polyline> Constructed from ray( ... ) above.
rayEndOrg( Ray )
Returns
<Point> The origin of the last leg of a ray.
Ray
<Polyline> Constructed from ray( ... ) above.
rayEndDir( Ray )
Returns
<Vector> The direction of the last leg of a ray.
Ray
<Polyline> Constructed from ray( ... ) above.

Ray Operations

reverseRay( Ray )
Returns
<Polyline> Construct a ray by reversing the points of the polyline that represents the original ray.
Ray
<Polyline> Constructed from ray( ... ) above.
fireRay( Ray, OpticalPath )
Returns
<Polyline> Construct a, possibly compound, ray that results from firing the input ray at the given optical path.
OpticalPath
<Group> Represents an optical path constructed from opticalPath( ... ) below.

Optical Element Construction

The geometry of an optical element is defined by: Currently these elements are represented by polygons or circles with attributes identifying what type of optical elements they are.

 Polygons for optical elements are currently restricted to convex, planar shapes. The polygons should not have degenerate sides (i.e., repeated vertices). No checking is done for these conditions.

 The behavior of these elements is as follows:

 

Mirrors:
If a ray hits the front of a mirror, then it will continue via reflection. If a ray hits the back of a mirror, then it will be stopped by the mirror's plane. If the ray hits the mirror's plane but misses the mirror, then it will be stopped by the mirror's plane. Otherwise the ray will continue unobstructed by the mirror.

 Surface normals for mirrors obey Alpha_1 modeling conventions. Normals point to the inside of mirrors, and a ray must be on the outside of a mirror in order to be reflected by it. If, from a ray's perspective, the points of a mirror's polygon appear to be clockwise, then the ray is outside the mirror (i.e., the mirror normal points away).

 

Apertures:
If a ray hits either side of an aperture, then it will continue with its direction uneffected. If a ray hits an aperture's plane, but misses the aperture, then the ray will be stopped by the aperture's plane. Otherwise the ray will continue unobstructed.

 

Obstructions:
If a ray hits either side of an obstruction, then it will be stopped. Otherwise the ray will continue unobstructed.

 

The optical element constructors are:

 

mirror( ApertureArgs )
Returns
<Polygon> | <Circle> Construct a planar mirror element.
ApertureArgs
<Circle> | <Polyline> | <Points...> Gives the shape and orientation of the mirror.
aperture( ApertureArgs )
Returns
<Polygon> | <Circle> Construct a planar aperture element.
ApertureArgs
<Circle> | <Polyline> | <Points...> Gives the shape of the aperture.
obstruction( ApertureArgs )
Returns
<Polygon> | <Circle> Construct a planar obstruction element.
ApertureArgs
<Circle> | <Polyline> | <Points...> Gives the shape of the obstruction.

Optical Paths

In order to interact with rays, optical elements must be incorporated into an optical path object. Optical paths are simple sequential arrays of optical elements. A ray may be fired at an optical path where it will interact with each of the path's optical elements in turn. Note that this model does not support general ray casting which requires a search strategy to determine which objects in an environment a ray interacts with.

 

opticalPath( OpticalElements... )
Returns
<Group> Construct an optical path from a series of optical elements.
OpticalElements...
<OpticalElement> A series of optical elements.