You are on page 1of 187

6

Version

RayCAD
Opto/Mechanical Design for AutoCAD

User's Manual

Information in this manual is subject to change without notice and does not represent a commitment on the part of the vendor. The software described in this manual is furnished under a license agreement and may be used or copied only in accordance with the terms of the agreement.

RayCAD is a registered trademark of RayCAD Co.

Copyright RayCAD Co., 1993-1999. All rights reserved.

AutoCAD is a registered trademark of Autodesk, Inc. ZEMAX is a registered trademark of Focus Software, Inc.

RayCAD 77 Scribner Road, Tyngsboro, MA 01879 raycad.com Thorlabs, Inc. Document 2875-D01 Rev. A 11/15/99
1199Ver6

Table of Contents
Chapter 1......................................................................................................... 1 Introduction ................................................................................................. 1 Key to Document Conventions ................................................................. 3 Understanding Terminology ..................................................................... 4 Interpreting Prompts................................................................................. 6 Other Useful Commands .......................................................................... 8 Chapter 2......................................................................................................... 9 Installation of RayCAD................................................................................ 9 First Time Installation .......................................................................... 9 Upgrade Installation ............................................................................. 9 Inside AutoCAD Initialization ............................................................ 10 First Time Initialization ...................................................................... 10 Normal Initialization .......................................................................... 10 Upgrade Initialization ......................................................................... 11 Menu Conflict .................................................................................... 11 Index File Locations ........................................................................... 12 Uninstalling RayCAD......................................................................... 12 Installation Troubleshooting ............................................................... 12 Chapter 3....................................................................................................... 13 Getting Started........................................................................................... 13 Quick Start............................................................................................. 14 Step 1 - Surface, Making surfaces ....................................................... 14 Step 2 Inputray ................................................................................ 15 Step 3 - Raytrace ................................................................................ 16 Step 4 - Optimize................................................................................ 17 Tutorial Using Sample Drawing ............................................................. 19 Overview............................................................................................ 19 Initialization ....................................................................................... 20 Display Example ................................................................................ 21 Drawray Example............................................................................... 21 Inputray Example ............................................................................... 23 Raytrace Example 1............................................................................ 26

Surface Example ................................................................................ 27 Raytrace Example2............................................................................. 38 Optimize Example.............................................................................. 39 Remove Example ............................................................................... 44 Raytrace Example 3............................................................................ 46 Chapter 4....................................................................................................... 49 Commands................................................................................................. 49 RayCAD Command Summary................................................................ 49 Body Command ..................................................................................... 51 Display Command.................................................................................. 54 Display|Surflook................................................................................. 55 Display|Dataprint................................................................................ 56 Display|Viewports .............................................................................. 57 Display|Restore scrn ........................................................................... 58 Display|RenderReady ......................................................................... 58 Inputray Command................................................................................. 60 Inputray|Drawray................................................................................ 62 Inputray|Gather .................................................................................. 64 Inputray|Listray .................................................................................. 66 Object to Optical Command ................................................................... 67 Object to Optical|Assign OpticalProp.................................................. 68 Object to Optical|3D Objects............................................................... 72 Optimize Command ............................................................................... 75 Optimize|Focus group......................................................................... 79 Optimize|COllimate group .................................................................. 82 Optimize|Curvature optimizing ........................................................... 85 Optimize|Adjust ................................................................................. 88 Optimize|Rotate.................................................................................. 94 Optimize|Mode................................................................................... 97 Optimize|Mode................................................................................... 98 Raytrace Command ................................................................................ 99 Raytrace|Trace.................................................................................. 100 Raytrace|Grid ................................................................................... 102 Raytrace|Random ............................................................................. 102 Raytrace|Option................................................................................ 103 Raytrace|Spot ................................................................................... 104

Raytrace|Spot|Point style................................................................... 107 Remove Command............................................................................... 110 Remove|Remove renumber............................................................... 111 Remove|Erase................................................................................... 111 Surface Command................................................................................ 112 Coordinate System............................................................................ 113 Good Advice .................................................................................... 115 Surface|Makesurf.............................................................................. 116 Index Data........................................................................................ 124 Refractive surfaces requiring unique input ........................................ 131 Diffractive Surfaces.......................................................................... 131 Reflective Surfaces ........................................................................... 133 Contour............................................................................................ 134 Samples of Isolating the r and K values............................................. 138 Component Thickness ...................................................................... 141 Surface Name................................................................................... 141 Defining Second Surface .................................................................. 142 Rotation ........................................................................................... 143 Surface|Catalog ................................................................................ 145 Surface|Sfnumber ............................................................................. 146 Surface|Listsurf ................................................................................ 149 Surface|Editsurf................................................................................ 150 Surface|Clone ................................................................................... 151 Surface|Redraw ................................................................................ 152 Surface|Deactivate ............................................................................ 153 Surface|Activate ............................................................................... 153 Surface|Export.................................................................................. 153 Surface|Import.................................................................................. 153 Chapter 5..................................................................................................... 161 Helpful Hints ........................................................................................... 161 Appendix..................................................................................................... 169 Glossary ...................................................................................................... 175 Index ........................................................................................................... 179

Introduction

Chapter 1
Introduction
Welcome to optical ray tracing in an AutoCAD environment using RayCAD Version 6.0. Not too long ago, optical ray tracing was highly complicated involving extensive math and very lengthy calculations. It was also very prone to errors. In recent years, computers have been used to do the calculations, but suffered greatly from complex interfacing and complex optical terminology, which has limited the broad use of optical design packages. Our goal in designing RayCAD was to provide a tool for modeling optical components and optical layouts in the same environment where your design or drawing takes place. Effort has been made to make this a responsive tool by keeping the size of the program and the computer demand to a minimum. This allows for quick loading and quick response while, at the same time, leaving AutoCAD fully operational. The operator interface is written in AutoLISP and, in conjunction with menus, icons and pull-downs, provides a familiar interface. Once initialized, the loading of programs is automatic and only the portion of the program needed is loaded. The operation of RayCAD is consistent with the way you draw and design in AutoCAD. All of the familiar commands like MOVE, ROTATE, STRETCH and many others are used to point and drag surfaces and input rays into the configuration your design requires. For example, to move an array of input rays that represent your light source, off the central axis use the STRETCH command and drag a whole array of input rays to a new location (this is opposed to going to a spread sheet and keying in a new starting point and angular directions for each of the rays). AutoCAD's viewing and view ports, along with DVIEW and ZOOM, are used to evaluate your ray traces. After placement of two or more

Chapter 1

surfaces and one or more input rays, you are ready to run a ray trace. The computational portion of the program is written in C language and is used for such tasks as calculating surface to ray intersections, surface interactions (reflection, refraction and diffraction), aperture openings, indexes, random ray generations, etc. The heart of the program is in the ray to surface intersection and interaction routines. 3D vector math is used throughout. A brief description could start with thinking of a ray as a line with a starting point S and a direction of D (where x y z are unitized) and a scale factor t so that a ray is projected into 3D space by multiplying t with the x y z directions - final point P=S+Dt (caps indicate 3D vectors). This ray equation fully describes a line in 3D where the end point is determined by the size of t. Therefore, if this ray is to intersect with a surface, there must be a value of t describing the exact intersection point on the surface. By substituting the ray equation into an appropriate equation describing a 3D object and solving for t, the new intersection is found. At that point, a "normal" to the surface is generated. Then, depending on the type of surface encountered (reflection, refraction or diffraction), the appropriate optical formula is applied using necessary information like wavelength, index, diffraction order. This has now produced a new ray start point with a direction determined by the optical properties and surface shape. This process is then repeated for each surface and starts over for each input ray you supplied. We want to emphasize that RayCAD is not like any other optical ray tracing software. The open architecture of AutoCAD allows an operator the freedom to model many optical designs that weren't even thought of by the developer of RayCAD. In short, just as in AutoCAD, the tool that RayCAD provides allows your imagination to run free.

Introduction

KEY TO DOCUMENT CONVENTIONS


This book uses the following document conventions:

EXAMPLE Type cd rayinst or Command: SURFace SHELL Note: If you have ....
(terpri)(prompt"Check ....

DESCRIPTION Bold text indicates information you must supply Uppercase letters represent AutoCAD commands and block names. Indicates additional information about RayCAD and ray tracing. This small typeface is used to show LISP and menu.

Chapter 1

UNDERSTANDING TERMINOLOGY
Commonly Used AutoCAD Commands Useful in Operation of RayCAD

RayCAD's commands are added to AutoCAD, leaving all of AutoCAD's commands still available. It adds the capability to AutoCAD to model optical surfaces and produce ray traces in a standard AutoCAD drawing. Below is a brief description of commonly used AutoCAD commands used in the operation of RayCAD. For details of the commands, see your AutoCAD Command Reference manual or, on command line, type ? for AutoCAD Help.

COMMAND 'VIEW 'ZOOM ARRAY DVIEW LINE MIRROR MOVE OFFSET ROTATE SCALE

DESCRIPTION AS APPLIED TO RAYCAD Saves and restores named views. Increases or decreases the apparent size of objects in the current viewport Converts a line (input ray) into an array of lines in a fan or parallel pattern Defines parallel projection or perspective views. Is used to draw input ray(s). Creates a reverse copy of input rays and surfaces. Moves the input rays and surfaces. Converts a line (input ray) or surface into an array, Separated by a specified distance. Rotation of surfaces and input rays. Change the size of input rays. If used in conjunction with STRETCH, you change the diversion of a fan of rays by first scaling it, then stretching it to drag the light source back in place.

Introduction

COMMAND STRETCH U

DESCRIPTION AS APPLIED TO RAYCAD Repositioning of light source and generation of Vignetting offsets. Undo allows you to explore and experiment without fear of doing something wrong. Press U <ENTER) and everything is restored the way it was. The Undo command can be used repeatedly. It can take you right back to the very first thing you did. Manages user coordinate systems. Divides the graphics area into multiple tiled viewports.

UCS VPORTS

Chapter 1

INTERPRETING PROMPTS
You can access RayCAD commands in three basic ways - the toolbuttons, the s top pull-down, or from the command line. Our examples are illustrated using the top pull-downs and many commands are continued on the command line. As you gain more knowledge, the keyboard shortcut commands may be useful. Top Pull-down RayCAD: The top pull-down menu gives you access to all of RayCAD's commands, some subcommands may be continued on the command line. The syntax used in the manual for describing pull-down menus is a follows: RAYCAD|SURFACE|MAKESURF|LENS Command Line: The command line is the main location for entry except when a dialog box is in use. Many commands are terminated with a default value shown in brackets. You can typically accept the default if in doubt and make changes later. RAYCAD PROMPTS /?/ /Import/EXport/ DESCRIPTION Accesses RayCAD Help. Pressing capitalized character accepts keyword or select corresponding keyword from side menu. Pressing ENTER to prompt terminated by a colon (:) causes an exit. Words or values inside brackets are default. Pressing ENTER will accept it. All surfaces are blocks with an insertion point in the center of the surface. Type INS and point to the surface if you desire the base point in the center of the surface. Surface nametag is always indicated by "SURF", a number and an optional tag.

/Inputrays/Surface: <default> Base point

Nametag SURF-4TEST

Introduction

RAYCAD PROMPTS Object Selection

DESCRIPTION To the prompt "Select Objects", the following characters are valid:

W - Selects all entries fully enclosed in the cursor window C - Selects all entries crossed by the cursor window R - Allows removal Of entries from your selection A - Gets you back to adding to your selection Object Selection is a standard AutoCAD operation and is more fully described in the AutoCAD User Guide Manual under the heading of Selecting Objects. - Undo allows you to explore and experiment without fear of doing something wrong. Press U <ENTER) and everything is restored the way it was. "Mark encountered" indicates an RayCAD command is completely undone.. The Undo command can be used repeatedly.

Chapter 1

OTHER USEFUL COMMANDS


COMMAND @ (at) ' (apostrophe) DESCRIPTION Recalls last point in the drawing when entered as a response to a coordinate prompt. Indicates an AutoCAD's transparent command. Can be used while running an RayCAD command. Small squares that appear on objects you select. After selecting the grip, you edit the object by dragging it with the mouse rather than entering commands. Very useful for indicating a trace surface intersection point. Center of a surface is the block insertion point. An AutoCAD setting that limits pointing device input to horizontal or vertical (relative to the current snap angle). A mode for locking the pointing device into alignment with an imaginary rectangular grid. When Snap mode is on, the screen crosshairs and all input coordinates are snapped to the nearest point on the grid. The snap resolution defines the spacing of this grid.

Grip

INS ORTHO (F8)

SNAP (F9)

Installation of RayCAD

Chapter 2
Installation of RayCAD
Included here are instructions for installing RayCAD. The method depends upon which AutoCAD Release is being used and whether this is a new or upgrade installation. Please refer to the appropriate section. First Time Installation
Password is located on CD case

To install, insert CD in drive and use Windows Add/Remove program. Select Start | Settings | Control Panel. Double click Add/Remove Programs. Click Install.. button choose browse button to select CD drive. Double-click Win95 or WinNT (depending on which operator system you are using). Select setupray.exe. An Installation Wizard will guide you through the CD installation. Upgrade Installation Use Uninstall as explained in Uninstalling RayCAD (below). You may have to manually remove ray.mn* since these are created by AutoCAD and may not be part of the uninstalling process. Proceed with the installation as outlined in First Time Installation above.

Chapter 2

Inside AutoCAD Initialization Instructions are included for: First Time Initialization Normal Initialization Upgrade Initialization Menu Conflict Index File Locations First Time Initialization After CD installation is complete, start AutoCAD as usual. From the top menu, select Tools | Applications (Rel. 13) or Tools | Load Application (Rel. 14 & 2000) or Assist | Load Application (Mechanical Desktop) and click the File... button. Locate \RayCAD6\RayCAD.lsp. Check Save List. (except in Rel. 2000) Click Load button. Click RayCAD label in top menu to run. Normal Initialization Whenever top menu does not display the RayCAD label, you must perform the normal Initialization. From the top menu, select Tools|Applications Select RayCAD.lsp. Click Load button. Click RayCAD label in top menu to run.

10

Installation of RayCAD

Upgrade Initialization After CD installation is complete, start AutoCAD as usual. From the top menu, select Tools | Applications (Rel. 13) or Tools | Load Application (Rel. 14) or Assist | Load Application (Mechanical Desktop) If an file named RayCAD.lsp is present in the Load dialog box, select it and press Remove. Click the File... button. Locate the new \RayCAD6\RayCAD.lsp. Check Save List. (Important) Click Load button. Click RayCAD label in top menu to run. Menu Conflict If two menu labels named RayCAD are found on the top menu bar, it is because all prior versions of RayCAD used a combined RayCAD and AutoCAD menu named RAY.MNU and this configuration has been saved as the default startup menu. This version of RayCAD will attach just the RayCAD portion of the menu to the standard AutoCAD menu therefore it is necessary to load a standard ACADFULL.MNU (or any other favorite menu) before RayCAD initialization.

11

Chapter 2

Index File Locations Any custom .INX files need to be copied to the \RayCAD6\Source directory. Uninstalling RayCAD To remove RayCAD, use Windows Add/Remove program. Select Start | Settings | Control Panel Double click Add/Remove Programs Select RayCAD and click Add/Remove button Installation Troubleshooting No Menu Showing: If you followed instructions in RayCAD Upgrade Installation notes and erased or renamed the old ray.mnu, AutoCAD may load up without a menu. On the command line, type menu and select your favorite menu (such as ACADFULL.MNU) and proceed with the initialization. Network and File Protection Related Problems: The Tools|Load Application adds a line "C:\RayCAD6\RayCAD.lsp to a file named appload.dfs. If this file is write-protected, as can be the case in many network installations, it is necessary to make a local copy of appload.dfs and place this file in a directory on your hard disk which is included in AutoCAD's search path and proceed with the initialization.

12

Getting Started

Chapter 3

Getting Started
This section contains: Quick Start (a little help to get you going) Tutorial (use with a supplied drawing to try out some of RayCAD's command)

13

Chapter 3

QUICK START
For detailed samples, see Tutorial in this section

Step 1 - SURFace.................................... Step 2 - INPutray..................................... Step 3 - Raytrace...................................... Step 4 - OPTimize.............. .................

Page 14 Page 15 Page 16 Page 17

Start AutoCAD in the usual way. RayCAD will initialize automatically if you completed the Initialization described in Initialization. RayCAD menu will load. The top pulls down menus and toolbuttons provide access to RayCAD. First we will prepare the screen. Select Display | Viewports. This will create three view ports. One view is set to a world (top) view, one is set to a front view, and one is an isometric view which gives you a 3-D view of the design. Click onto the bottom view, making this your working view. Set SNAP to a resolution matching your layout. The use of SNAP (F9) and ORTHO (F8) help in precision placement and rotation. Step 1 - Surface, Making surfaces From the top pull-down, select RayCAD|Surface| Makesurf. A list of components is shown.
Placement of surfaces

Proceed by placing any surfaces you like, usually starting with an Aperture and ending with a Screen. You need at least 2 surfaces to do a ray trace. For this Quick Start, place an Aperture, a Lens and a Screen. (Note that a Screen does not affect ray direction - use it anywhere in your layout).

14

Getting Started

Surface can be placed in any direction

Apertures, Baffles and Screens are single surfaces that have no thickness. For a Lens, which is a two surface component, you are prompted for thickness, spacing the two surfaces apart. See command section Surface|Makesurf on page 116 for details. RayCAD does not deal with components, only with surfaces. All components are treated as one or more surfaces. The two surfaces of a lens are not attached in any way other than they share material, therefore, they must have the same index name. This makes it possible to model complex, multifaceted objects. Step 2 Inputray Before any ray trace can be accomplished, information regarding source location and radiation direction is necessary. Thus, the next step is to draw and gather input rays.

Sharing of Index

You can use AutoCAD's LINE command to draw input rays. Make sure that lines start at your source point. The direction is important!

There are several ways of generating a large number of input rays. The Raytrace command requires at least one line. It is used as a directional vector where the first point of a line represents the source point and the end of the line gives it a direction. The Grid and Random commands automatically generate large numbers of rays. In the case where your light source is placed at infinity, you need a minimum of two parallel lines so that these commands can differentiate between parallel or polar radiation (i.e., two parallel rays places your source at infinity). You can have as many input rays as you like (within memory restraint). The STRETCH command can be used to drag a whole array of rays into position.

15

Chapter 3

Later, when ray tracing, automatic generation of large numbers of input rays can be performed using Random Ray and Grid trace commands. The next step is to use the RayCAD|INPutray|Gather command to assign wavelength(s), color emulation and, gathering of the input rays just drawn. The Gather command writes a file named STARTRAY.DAT containing start and end point of each input ray. Step 3 - Raytrace A ray trace can be sequential or non-sequential. Settings can be changed using RayCAD|Raytrace|Option and is saved in RAY.INI, therefore becoming default for future editing sessions. The trace mode selected depends upon your design. If your design allows for reentry of a surface, you must use non-sequential mode. When completed, a set of rays are drawn as polylines, one for each input ray times the number of wavelengths associated with it. Hint: Selecting a polyline by just pointing starts the GRIP command. This draws a small square at each intersection point allowing a visual inspection of ray to surface intersections.

16

Getting Started

Step 4 - Optimize There are two types of optimization: Type 1: Curvature optimizing RayCAD will automatically adjust curvature variables like radius, conic and aspheric constants in an attempt to bring two rays to a point. Type 2: Positioning optimization RayCAD will automatically move a group of surfaces using a Lead surface for its direction in an attempt to bring two rays to a point or a parallel. Note: When Optimize moves a group to a new position the body, if any, with a block insertion point coinciding with the insertion point of the surface being moved, will tag along. Note: Since a change in curvature can cause the body not to fit, use the ERASE command either before or after optimization to erase the old body, then use the BODY command to make a new body that fits. See Body command on page 51 for more information.
If things don't work out the way you wanted, use Undo to restore your design back the way it was.

Let's start optimizing. Select RayCAD|Optimize. At this point you have a choice between curvature optimizing or positioning optimization. A dialog box allows you to identify surfaces as a Leader, Target and Group. In both types of optimizing, only two input rays are used. Curvature optimizing attempts to bring these two rays to a point on a Target surface. Positioning optimize gives you an option between bringing the two rays to a point or to a parallel at a Target. As optimization takes place, three sets of numbers are

17

Chapter 3

displayed: Spread, Last Spread and Scaler. These numbers indicate distance between intersection points on the Target and the scale used for the adjustment. You can press a key any time to exit the optimization routine. Note: Not all optimizations will have success. If Spread and Last Spread keep repeating pattern, press a key to stop the optimization. After the trace is drawn, investigate what caused this condition. Look for rays missing a surface. Also, in some cases, it is not possible to accomplish a focus or collimation. In such a case, a curvature change may be required. Other times it may be required to move more than one surface. This completes Quick Start. The following Tutorial presents you with samples of some of RayCAD's commands.

18

Getting Started

TUTORIAL USING SAMPLE DRAWING


Overview........................................ Initialization ........................... DISPlay (set up view ports) ....... Drawray (automatically generate input ray INPutray (choose colors) .. . Raytrace 1 (do ray trace) ....................... SURFace (add a lens) ..................... ... Raytrace 2 (do ray trace) .......... . OPTimize (focus)......... .. Erasing a Surface ... Raytrace 3 (do ray trace) .......... . Overview We use a supplied sample drawing named RAYCAD1.DWG. This is a simple optical layout consisting of an aperture, a lens, a mirror and a screen. When optimizing, the screen will be used as the Target for the focus. We have made the screen large enough so that rays won't run off the surface when focusing. Each command used is described in detail in the Commands section of this manual beginning on page. RAYCAD1.DWG was saved containing the menu required to run RayCAD. Certain steps appear only in the beginning of the sample section. If, for some reason, you get out of sync with the manual as you work on the sample drawing and find there are discrepancies between screens and the manual, just type U for Undo (repeatedly if necessary) until you are back. Page 19 Page 20 Page 21 Page 21 Page 23 Page 26 Page 27 Page 38 Page 39 Page 44 Page 46

19

Chapter 3

You can access RayCAD commands in three basic ways s the toolbuttons, the top pull-down, or from the command line. Our examples are illustrated using the top pull-downs and many commands are continued on the command line. As you gain more knowledge, the keyboard shortcut commands may be useful. Note: All of the sample drawings can be copied directly from RayCAD6\Samples. Initialization The following section assumes you ran INSTALL. Start AutoCAD and open the drawing file RayCAD6\samples\RayCAD1.dwg (see Figure 1). This sample drawing will be used to demonstrate how RayCAD works.

Figure 1

20

Getting Started

AutoCAD Rel. 13 users, select Tools |Applications | RAYCAD6\RayCAD.lsp and select Load. AutoCAD. Rel. 14 & 2000 is loaded automatically. See "Appendix C Troubleshooting" if an error occurs. Display Example Select RayCAD|Display|Viewports, creating three view ports. One view is set to a world (top) view, one is set to a front view, and one is an isometric view which gives you a 3-D view of the design. Click onto the bottom view to make it the active view. Drawray Example The first example will show the Drawray command. We will have RayCAD automatically generate a Fan (polar) of 4 input rays using Width for the direction of the array. Note: If starting a new drawing, you normally would insert surfaces first, then draw some input rays. We start you up working on an existing drawing where some surfaces are already placed. From the pull-down menu, select: RayCAD|INPutray|Drawray|Fan Width (y axis) Place the start point of ray :

21

Chapter 3

Use SNAP (F9) and ORTHO (F8) for precision placement

Place pointer at the source point and click to set the position (see Figure 2).

Figure 2

Number of rays:<5>: 4

22

Getting Started

Type 4 and press Enter. RayCAD automatically draws a fan of 4 rays (see Figure 3).

Figure 3

Inputray Example The next example shows the INPutray command. Select RayCAD|INPutray|Gather. Here you choose the color of the trace, wavelength(s) and input rays. Trace Color set to Wavelabel /?/Listray/Drawray/Gather/eXit>: Gather

23

Chapter 3

Choosing Gather calls up the Wave Label Selection dialog box (Figure 4) where you select wavelength(s) and color emulation.

Figure 4

"Current" window shows wavelength 587.6 which we will use. Note: Detailed explanation of the dialog box is covered in the Command section on page In this case, we will emulate the color assigned to the wavelength for our ray trace. In "Trace Color Emulation",

24

Getting Started

click onto Wave labels. Press OK to accept. The sample drawing now shows surfaces with 4 input rays drawn. Use CROSSING to choose all 4 rays. See Figure 5

Select Input Ray(s) for waves just selected: Select objects: CROSSING

Figure 5

Point to lower right of input rays and drag across to the upper left.

25

Chapter 3

Note: See Understanding Terminology on page 4 for selection arguments. First Corner: Other corner: 4 found Select objects: Press Enter Trace color set to Wavelabel /?/Listray/Drawray/Gather/<eXit>: X

This completes INPutray for the ray trace and returns you to the AutoCAD command line. Raytrace Example 1 Select Raytrace|Trace. Four input rays and associated wavelengths have been selected and you are ready for tracing. "SURF-1" is processed "SURF-2" is processed "SURF-3" is processed "SURF-4" is processed "SURF-5" is processed Drawing in progress.

26

Getting Started

Figure 6

Four rays are traced through four of the surfaces and projected onto the fifth for the 587.6 wavelength (Figure 6). For more details on the Raytrace command, see page 99. This is the end of the Raytrace|Trace command. Surface Example This example will show the SURFace command. Working with the same optical layout, you will place a lens into the optical path. When this sample drawing was created, surfaces were inserted from a UCS World View. For consistency, make sure UCS is set to World by typing UCS W then point to the window where the UCS symbol shows a W. You can, of course, insert surfaces in any UCS or view you like. However, consistency makes it a whole lot easier.

27

Chapter 3

Select RayCAD|SURFace|Makesurf|Lens
Think in terms of surfaces as opposed to components.

Note: When surface is mentioned, think in terms of a zero thickness film at which point light will interact and change direction. (i.e., a lens always consists of two surfaces and a mirror always has one surface). Note: Much flexibility in your layout is gained by dealing with components in terms of surfaces. Large numbers of refractive surfaces can be combined into a complex component as long as they share material. Place center of surface location:

Note: Turn on SNAP (F9) to precisely align new lens. Point to the location where the center of the surface is to be placed. See Figure 7

28

Getting Started

Figure 7

Component selection and placement is completed and the Glass Selection dialog box appears (Figure 8)

29

Chapter 3

Figure 8

Select User File.INX in the Source of Index data: and select BK-7 in Glass Names. Click OK. The Select Index file dialog box (Figure 9) appears. Find RayCAD6\source\silica.inx and press OK.

30

Getting Started

Figure 9

The Glass Selection dialog box appears with your selections (Figure 10). Press OK.

31

Chapter 3

Figure 10

Note: Leave the medium as 1.0003 (default) The Contour Maker dialog box appears (Figure 11).

32

Getting Started

Figure 11

From More Shapes: pick Flat and press OK.

33

Chapter 3

Figure 12

In the Contour Maker Dialog Box, change dia. to 4.0 and press OK. (Figure 12). You enter component thickness from the command line. Component thickness.. Center to center (not the edge) <0.5>: 0.5

Either use your pointer or type in the value of 0.5 Note: In the case of a two surface component, thickness is

34

Getting Started

used to automatically space the second surface. To later change the thickness of a lens, don't edit the thickness of it but use AutoCAD's MOVE command. For a single surface component like a mirror, thickness is used by the Body command to show the backside. The computer recommends the next available surface number, but since we are inserting a surface into the sequence in the fourth position, we will choose 4, telling the program to insert this component as SURF-4. First free Surface number is 6. Surface Number ... Enter any number <6>: 4

Second surface's definition... (Y/N) <Y>: Yes

35

Chapter 3

The Contour Maker dialog box again appears. Make this surface a Sphere and press OK. (Figure 13).

Figure 13

Change the Curve: to Concave. Make R (radius) 14.0 and change the Diameter to 4.0. Press OK. A body is automatically drawn connecting the two surfaces. Note: Remember, bodies are only for appearance sake. They have no optical properties. If you are doing a lot of surface adjustments, you may find it easier to erase the bodies and, when near completion, regenerate the body by using the Body command. Surface insertion is completed (Figure 14).

36

Getting Started

Figure 14

Let's clean up old traces. From command line, type ERASE and C for CROSSING to remove old traces (see Figure 15). Be careful not to pick the surface, or your input rays.

Figure 15

37

Chapter 3

Raytrace Example2 The next step will be to do another ray trace, this time tracing rays through the new fourth and fifth surface. The input rays from the last ray trace are unchanged and will be used for this new ray trace. Select RayCAD|Raytrace|Trace "SURF-1" is processed "SURF-2" is processed "SURF-3" is processed "SURF-4" is processed "SURF-5" is processed Erase last raytrace (Y/N) <Y>: N Drawing in progress.

Note: We answer No here because we just erased them all by using AutoCAD ERASE command.

38

Getting Started

Figure 16

New ray trace has been accomplished using the two new surfaces (Figure 16). Optimize Example For this example we will be using OPTimize to focus the output rays onto the last surface by moving the mirror (surface #6). Before optimizing, erase all existing rays using the AutoCAD ERASE command and Crossing to clean off all old traces. Answering Yes to "Erase last raytrace (Y/N)" only erases the last raytrace. Prior traces may lie underneath. There are two types of optimization: Type 1: Curvature optimizing RayCAD will automatically adjust curvature variables like

39

Chapter 3

radius, conic and aspheric constants in an attempt to bring two rays to a point. Note: Since a change in curvature can cause the body not to fit, use the ERASE command either before or after optimization to erase the old body, then use the BODY command to make a new body that fits. See Body command on page 51 for more information. Type 2: Positioning optimization RayCAD will automatically move a group of surfaces using a Lead surface for its direction in an attempt to bring two rays to a point or a parallel. For this example we will choose "focus of a group". This will position a surface or a group of surfaces, in an attempt to bring two rays to a point. Select RayCAD|Optimize|Focus a group. The Optimize Parameters dialog box appears (Figure 17 .

Figure 17

40

Getting Started

In the "Active Surfs" window, click on Mirror SURF-6. In the "Aim Setting" window, click on Set Leader. Click onto Screen SURF-7 and make that the Target. We will not set the Group as no other surfaces are to be adjusted in this example. Note: The same dialog box is used in both types of optimization. The window "Optim on" is only active when optimizing a curvature. Press OK. "SURF-1" is processed SURF-2" is processed SURF-3" is processed SURF-4" is processed "SURF-5" is processed Erase last raytrace (Y/N): No

In both types of optimizing, only two input rays are used. Curvature optimizing attempts to bring these two rays to a point on a Target surface. Positioning optimize gives you an option between bringing the two rays to a point or to a parallel at a Target. Since more than two rays were gathered from our prior ray trace, the message below appears (Figure 18). Press OK.

Figure 18

41

Chapter 3

RayCAD jumps to the Inputray command. This allows you to select wavelength and two input rays directed toward the part of surface of interest. Trace color set to Wavelabel. /?/Listray//Drawray/Gather/<eXit>: Gather

In the Wave Label Selection dialog box, keep wavelength 587.6 and Trace Color Emulation at Wave labels and press OK. Pick two outer rays (Figure 19).

Figure 19

Press eXit to leave INPutray. As optimization takes place, three sets of numbers are displayed: Spread, Last Spread and Scaler. These numbers indicate distance between intersection points on the Target and the scale used for the adjustment. You can press a key any time to exit the optimization routine. Note: Not all optimizations will have success. If Spread and Last Spread keep repeating a pattern, press a key to

42

Getting Started

stop the optimization. After the trace is drawn, investigate what caused this condition. Look for ray missing a surface. Also, in some cases, it is not possible to accomplish a focus or collimation. In such a case, a curvature change may be required. Other times it may be required to move more than one surface. For details, see OPTimize on page 75. "New location for surface is" (11.2455 2.980 390.0) Note: Numbers may vary depending on the insertion point of the lens added in the last SURFace example. Notice that rays are now collected at the final surface and the mirror surface has moved backward following the direction of it's normal to accomplish this (Figure 20).

Figure 20

Note: When Optimize moves a group to a new position, the

43

Chapter 3

body, if any, with a block insertion point coinciding with the insertion point of the surface being moved, will tag along. This completes optimizing. Remove Example We will now remove the lens (SURF-4 and SURF-5) we have just placed. Note: You could use the RayCAD|Remove|Erase command. The difference is that Remove renumber will rename existing surfaces to close gaps in the number sequence. Erase will merely erase the surface block but it is still present in the database and will leave a gap in the number sequence. This is not a problem for either sequential or non-sequential ray tracing and later, when making a new surface, you can simply give it the number of the gap and it will fill it. Select AutoRay/Remove/Remove Number The Surface Selection dialog box opens (Figure 21). Here you click onto Lens Surf-4 and Lens Surf-5 and click OK.

44

Getting Started

Figure 21

Both surfaces have been removed. Now use AutoCAD ERASE to remove the 3D grid. When done, the drawing should resemble Figure 22. Don't worry if the ray trace is erased, too.

45

Chapter 3

Figure 22

Raytrace Example 3 Let's trace rays through this optical layout. Select RayCAD|Raytrace|Trace. "SURF-1" is processed "SURF-2" is processed "SURF-3" is processed "SURF-4" is processed "SURF-5" is processed Erase last raytrace (Y/N) Y Drawing in progress. Rays are traced through this latest optical layout (Figure 23).

46

Getting Started

Figure 23

1. 2. 3. 4. 5.

This concludes the tutorial. You are now ready to do a new optical layout Create surfaces using the SURFace command. Using INPutray, draw input rays, choose color association and assign wavelengths. Do a Raytrace. OPTimize component location to accomplish your design goal.

Note: See Command section page 49 for details. Also see "Helpful Hints" on page 161 for some useful information.

47

48

Commands

Chapter 4
Commands
RayCAD's commands are added to AutoCAD, leaving all of AutoCAD's commands available at all times - including Snaps, Grips and Transparent commands.

RayCAD Command Summary


COMMAND Body Display (DISP) Surflook Dataprint Viewports Restore scrn Render-Ready Help Inputray (INP) Drawray Gather Listray Object to Optical Optimize (OPT) Focus Group Collimate Group Curvature Adust Rotate Mode DESCRIPTION adds body to optical surfaces to create 3dlook. controls what you see and how you see it ... see different perspectives sets the print mode ... creates 3 view ports . restores the screen ... render optical surfaces and ray traces .. quick look-up table of commands ... collects input rays for ray tracing . ... automatically create input rays . ... collect wavelengths and input rays .. display file startray.dat . ... AutoCAD objects to optical optimizes the optical layout . automatic focusing .. automatic collimation .. change curvature radius ... study ray intersections . rotate surface ... choose trace sequence .. PG 51 54 55 56 57 58 58 59 60 62 64 66 67 75 79 82 85 88 94 97

49

Chapter 4

Raytrace (RT) Trace Spot diagram Random Option Grid Surface (SF) Makesurf Catalog SFnumber Listsurf Editsurf Clone Redraw Deactivate Activate Export Import

Calculates and draws the ray trace ... tracing of rays .. see image formation . visualize the light path . change trace mode ... produce rows and columns of input rays . creates and places optical surfaces ... user created surfaces surfaces from optical catalog ... affects surface numbering info on surfaces change surface characteristics .. duplicate a surface ... update a surface block exclude selected surface(s) from ray trace . reverses Deactivate command export data to a text file .. import data from other sources ...

99 100 104 102 103 102 112 116 145 146 149 150 151 152 153 153 153 153

50

Commands - Body Command

BODY COMMAND
The Body command makes optical surfaces look like 3D components. Body uses a 3D mesh to give surfaces thickness and body.
.

Note: The Body command is automatically called when applying the Surface|Makesurf, Catalog, and Import commands Note: When importing surfaces, the program makes assumptions regarding body construction. It is intended for a lens. In the case of more complex component modeling with multiple facets, you may need to erase the bodies and create new ones using the Body command manually. For a single surface component, Body looks up the surface thickness and draws the appropriate shape backing to the surface. When constructing a single surface, the side of the surface where the body is created depends whether the surface was initially inserted as a convex or concave surface, and is indicated by a negative thickness.

Single surface convex vs. concave

51

Chapter 4

For example, for a mirror generated as a convex (i.e., default positive radius), the thickness will be saved as a positive value causing the body to be developed on the side away from the center of the curvature as shown in.. Applying a Body to a two surface component is easy. The two surfaces are joined regardless of how they are spun around in AutoCAD.
Using Body on a double surface

component

If your first selection is a double surface component (i.e., lens), you are prompted to select the second surface. A mesh is then drawn which joins the two surfaces together. Remember - the wire mesh is not an optical surface. If it needs to be, erase the body and replace it using an optical surface named Tube. All surface bodies are made into blocks named BODY-nr and are placed on a layer named SFBODY. If the wire mesh obscures your study of ray traces, just type LAYER OFF SFBODY on the command line. You may erase a surface's body at any time as the body has no attachment to the surface other than the insertion point is the same as the surface that generated the body. If spacing has changed between two surfaces, erase the old body and use Body to create a new one. To change body thickness of a single surface component, use the RayCAD|SURFace|Editsurf|Thickness command and edit the thickness. Then, go back and redo the body.

52

Commands - Body Command

Thickness is only used for the initial spacing of surfaces on a multi surface component. To later change the spacing between surfaces, use the AutoCAD MOVE command. The thickness value is inconsequential at this point.

The Body command uses the thickness for single surfaces to draw the wire mesh. Editing of thickness only affects the thickness of the body - not the spacing between surfaces. The following example shows a two surface component where the body has been erased. The Body command is used to add a 3-D mesh .

Selecting RayCAD|Body causes the Surface Selection dialog box to appear. Click on Surf-1 then click Surf-2.

53

Chapter 4

DISPLAY COMMAND
DISP is a shorthand command for Display and can be called directly from the command line. Display will give you the ability to look at and manipulate different views of your drawing, allow you to set up view ports, set a print mode, and inspect a surface from all possible directions. The following is a list of commands found under RayCAD|Display: Surflook (see different perspectives) Dataprint (sets the print mode) .... ....... Viewports (creates 3 view ports) ...... ... Restore scrn (restores screen) ............... RenderReady ............ ........... Page 55 Page 56 Page 57 Page 58 Page 58

54

Commands - Display Command

RayCAD|Display|Surflook Surflook allows you to inspect a surface from different perspectives. Using the Surface Selection dialog box, choose a surface you want to look at. A close-up view of the selected surface is displayed and the view point is straight down the surface normal.

View control../Previous/Undo/Hide/Top/Front /Left/Right/DYnamic/In/Out/Chgd/X/Y/Z/Done/ <X>: The X, Y and Z rotate the view 15 around the chosen axis. Use Chgd to change the direction of the view rotation to 15 in the other direction. In and Out zooms the current view by 2X. Top, Front, Left and Right set the view direction. These commands give you a consistent way to look at your layout. Top is the same as Worldview. Note: All of AutoCAD's viewing facilities are available -

55

Chapter 4

Paperspace, Modelspace, Tiled Viewports. Hide is used to give a more realistic look to your design by hiding lines behind a solid object. Undo takes you back to first view after entering Surflook. Previous restores view just before entering Surflook. DYnamic sets the view point to the center of the selected surface and selects ray traces or spots surrounding that surface. Enter camera point <10.2813, 8.000, 0.0000>: CAmera/TArget/Distance/POints/PAn/Zoom/TWist /Clip/Hide/Off/Undo/ <eXit>:

For details of these commands, see DVIEW in your AutoCAD manual. Exit takes you back to the command prompt, leaving the current view intact. Note: To get back to original view, use Restore scrn. RayCAD|Display|Dataprint Dataprint will set a print mode. As calculation is done for each ray and each surface, intersections and ray directions are displayed on screen All errors or warnings are displayed, even if None is selected. RayCAD|Display|Dataprint|Screen The Screen option sends intersection and ray direction to

56

Commands - Display Command

the screen. RayCAD|Display|Dataprint|None None will suppress all printouts. Setting Dataprint mode remains in effect until the end of the editing session or until it is changed. RayCAD|Display|Viewports The Viewports command creates three view ports in TILEMODE. One view is set to a world view, one is set to a front view and one is an isometrics view which gives you a 3-D view of your design.

Note: To get back to a single view, use Restore scrn.

57

Chapter 4

RayCAD|Display|Restore scrn Restore scrn removes all view ports, resets clipped screens to Off, and places your view point at a World View and sets UCS to a World View. RayCAD|Display|RenderReady The Render-Ready option allows optical surfaces and ray traces to be rendered for a picture perfect presentation. Place optical components directly into a mechanical layout and explore the effect of design changes in both the mechanical and optical systems simultaneously. Use Render-Ready with a rendering package to simulate transparency, diffusion, reflection and refraction of surface properties, and define shadows. Your design is rendered, complete with rays traced, to create a photorealistic picture.

58

Commands - Display Command

Convert optical design to Render mode

From the Render-Ready dialog box you can choose to convert your drawing to Render mode. This will convert optical surfaces, input and output rays into solids. After rendering, convert back to Design mode. This will reduce drawing overhead due to wire meshes and provide less cluttered viewing. All RayCAD commands are valid in both modes. You can choose to convert all of the optical surfaces by checking "Convert all optical surfaces". The number of surfaces found is shown. Clear the check mark to skip surface conversion or use Pick Surface button to select specific surfaces. Use check marks to select input rays and traces for conversion. You can change the diameter of the rays to produce the best looking representation. Surfaces are placed on separate layers depending on the type of surface. For example, a glass component is placed on ray_glass layer. Also, rays are separated into ray_inputrays and ray_traces layers. This allows for assigned materials to be attached to specific layers.

Optical surfaces to be converted:

Convert input rays and/or traces Diameter of rays can be changed for best look

59

Chapter 4

INPUTRAY COMMAND
INP is a shorthand command for INPutray and can be called directly from the command line. The main function of INPutray is to gather input rays representing the direction of light from the light source and write these to a file named STARTRAY.DAT. It is possible to associate the trace color with a color assigned to a wavelength or emulate the color of input rays. Other subcommands let you create input rays and display information about your input rays. The INPutray command section covers: Drawray (automatically create input rays) . Gather (collect wavelengths & input rays) . Listray (display file STARTRAY.DAT) ...
Use SNAP F9 and ORTHO F8 for precision placement

Page 62 Page 64 Page 66

An input ray is a regular line, using the LINE command. Therefore, a number of AutoCAD's commands can be used to make input rays and modify input rays. You may start with the Drawray command discussed later in this section and then use any of the following AutoCAD commands for modifications. LINE Place one end at your light source and the other end directed to your first surface. Also see the INPutray Drawray command on page 62. Makes a fan (polar) and parallel array from a single input ray.

ARRAY -

60

Commands - Inputray Command

MIRROR OFFSET Also see Drawray

Creates a reverse copy of input rays. Forms new input rays by drawing them parallel to the original input rays.

Other commands that can be used to modify your input rays are: MOVE ROTATE STRETCH Moves the input rays. Rotates input rays about the base point. Can be used to drag your light source around. Select all input rays at the source end then point to the center of the source. Now drag the source to the new location and all input rays will follow. Input ray drawn in World (top) view can easily be stretched in the Z by using the Front View. See Display command on page on page 54. Change the size of input rays. If used in conjunction with the STRETCH command, you change the diversion of a fan of rays by first scaling it, then stretching it to drag the light source back in place.

SCALE -

Note: Make sure to run the Gather command anytime input rays have been changed. There are several ways of generating a large number of input rays. The Raytrace command requires at least one line. It is used as a directional vector where the first point of a line represents the source point and the end of the line

61

Chapter 4

gives it a direction. The Grid and Random commands automatically generate large numbers of rays. In the case where your light source is placed at infinity, you need a minimum of two parallel lines so that these commands can differentiate between parallel or polar radiation (i.e., two parallel rays places your source at infinity). See Raytrace|Random Rays on page on page 102 and Raytrace|Grid on page on page 102 for more information. RayCAD|Inputray|Drawray The Drawray command does an automatic generation of input rays, either as a Fan of rays (polar array) or as Parallel rays.
SURF-1 must be present in the drawing

The array generated will always be projected toward the first surface (SURF-1). Therefore, a surface named SURF1 must be present in the drawing. If you do not have any surfaces placed in the layout, use the SURFace|Makesurf command to generate at least one surface before using Drawray. Note: The direction of input rays is important. When using AutoCAD's LINE command to draw input rays, make sure that lines start at your source point. The direction is important. The length is not important.
RAYCAD|INPUTRAY|DRAWRAY|FAN WIDTH (Y AXIS) RAYCAD|INPUTRAY|DRAWRAY|FAN HEIGHT (Z AXIS) RAYCAD|INPUTRAY|DRAWRAY|PARELLEL WIDTH (Y AXIS) RAYCAD|INPUTRAY|DRAWRAY|PARELLEL HEIGHT (Y AXIS)

Remember Direction of input rays is important!

Place the start point of ray..: Number of rays: <5>:

62

Commands - Inputray Command

Parallel will automatically draw any number of parallel input rays.


Make a Fan of rays

Fan will automatically draw any number of input rays in a Fan (polar) configuration. Note: If first surface was inserted into a World View, and your current UCS is set to UCS World, the Width of the component would lie in the XY plane and the Height would be in the Z direction (extending out of the screen). If you select Height for your array or parallel rays, under these viewing conditions they will show up as a single line because you now need to look at this from a front view. In this UCS World view, you would want to see your rays in the XY plane thus select Width. Either Height or Width are, of course, valid. Which one you choose will depend on just what you are looking to see. To organize your optical layout, you may want to set up your display using the RayCAD Display command. See Display on page on page 54 for more information.

Surface entered in World View. Picture shows a Fan of 10 input rays using Width for direction of the array. Surface entered in World View. Picture shows a Fan of 10 input rays using Height for direction of the array. The array is laid out in a Z direction. That's why the array is shown as a single line in this view.

63

Chapter 4

RayCAD|Inputray|Gather The Gather command allows you to collect wavelengths and input rays through the Wave Label Selection dialog box and should be done prior to running a Raytrace command for the first time.
Input ray file is shared

Note: The Gather command writes a file named STARTRAY.DAT. This file is shared by all your drawings; therefore, you must use the Gather command anytime a different drawing is loaded (unless, of course, the input rays are identical in the different drawings).

64

Commands - Inputray Command

From this dialog box you select color association and wavelength.
Choose wavelength and how to correlate color

Choose a wavelength(s) by highlighting it and use the ">Add:" and "<-Del:" buttons or enter a new wavelength in the "Enter New wave in nm:" box. The wavelengths listed in the "Current" window will each be traced at that specific wavelength. Choosing the "Trace color emulation" will cause each set of ray traces to take on the color according to your assignment. Spectrum Current screen Wave labels Input rays Incremental -with the colors of the spectrum -with current AutoCAD color (default) -with a wavelength label -with input rays -cycle through AutoCAD's color numbering

"Spectrum" uses wavelength to color correlation. (if wave> (if wave > (if wave > (if wave > (if wave > (if wave<= 700 color 1) 600 color 2) 500 color 3) 400 color 4) 300 color 5) 300color 6)

"Wave label" uses the wavelength color(s) you choose for the trace color. Assign color to each wavelength listed in the "Current" box by double clicking onto the square box to the right. Your trace will clearly show the wavelength used for particular rays. "Input rays" allows you to correlate each ray traced with the color(s) that the input ray was drawn with. You may

65

Chapter 4

choose to set the color of your input rays prior to gathering. For example, from command line, type CHPROP - select an input ray and the new color. "Incremental" uses AutoCAD's color numbering so each ray in a trace can be tracked through your optical design. RayCAD|Inputray|Listray Listray will give you a screen text display of the file STARTRAY.DAT showing you the start point, end point, wavelength, and color of your current input ray selection.

66

Commands - Object to Optical Command

OBJECT TO OPTICAL COMMAND


OBJ is a shorthand command for Object to Optical and can be called directly from the command line. 3D Objects, 3D Faces, Edge, 3D Mesh, Revolved, Tabulated, Ruled and Edge Surfaces can be grouped and assigned optical properties such as Glass Material, Reflectivity or Opaque. These objects become optical components and are intersected and ray traced like regular RayCAD Surfaces. The combination of RayCAD's optical surfaces and the ability to change mechanical objects drawn in AutoCAD into part of the optical design is very powerful. Being able to turn covers, brackets, mounts, shafts, bearings, etc. into reflectors or blockers is useful in analyzing for stray light. Using these objects also means you can design optical components with any shape and size required. They can be made out of optical glass and will refract, being wavelength specific like regular optical components. It's necessary to think of AutoCAD Objects turned into optical objects differently than a normal RayCAD optical surface. RayCAD's surfaces are created by a conic or aspheric formula. This provides an exact and continuous surface to ray intersection point as opposed to an Object defined by three or more points such as 3D Faces and wire mesh which makes for many small flat surfaces. A smoothing can be applied causing the surface normal at the point of ray to surface intersection to be interpreted using the normal from four adjacent surfaces. It's clear that the finer the mesh you use the more precise an optical surface is established.

67

Chapter 4

The Object to Optical command section covers: Assign Optical Properties ... Page 68 3D Objects . . Page 72 Sample Drawing . Page 73
RayCAD|Object to Optical|Assign OpticalProp

The Optical Object Grouping dialog box provides a means to group AutoCAD's Objects which share Smoothing and Materials. The first part is used for collecting and naming groups. There is also a link to AutoCAD's Edit of Groups. The second part assigns smoothness and materials to the group.

68

Commands - Object to Optical Command

Pressing Collect new Object... (used to select objects) produces the following dialog box.

AutoCAD Objects that are to become optical objects are selected by the Pick Object button. Usable objects are 3D Objects, 3D Faces, Edge, 3D Mesh, Revolved, Tabulated, Ruled and Edge Surfaces. Before exiting, provide a name identifying this group.

Edit Object Group (makes a call to the standard AutoCAD Object Grouping dialog box)

69

Chapter 4

The common use of this dialog box is to Highlight to locate objects or Explode to eliminate objects. Several other functions can be performed. The group name must begin with "RAY_". The Description can be edited but care must be taken not to change keywords or field separators - no data validity test is performed!

70

Commands - Object to Optical Command

Assign Material... Pressing this button brings up the Optical Property dialog box for changing the material assignment.

The Refractive... brings up the standard Glass Selection dialog box which is explained in detail in the "Changes to Manual" insert sheets.

71

Chapter 4

RayCAD|Object to Optical|3D Objects

Several other commands are available and are all explained using AutoCAD Help.

72

Commands - Object to Optical Command

Sample Drawing Open sample drawing Box.dwg This drawing contains a box which is made from AutoCAD Objects. It also contains an aperture and 5 input rays. As our first exercise, use the RayCAD|Inputray|Gather command to gather input rays. Now let's ray trace the empty box. The box will serve as ray projection planes.

Select the Ray_Start_Box and click on Assign Material Choose Reflective. Do another raytrace and you will see the following results.

73

Chapter 4

By keeping the material assignment as Invisible, this box makes for a good starter drawing. You can simply start placing optical surfaces inside and study ray traces.

74

Commands - Optimize Command

OPTIMIZE COMMAND
OPT is a shorthand command for OPTimize and can be called directly from the command line. Note: Before optimizing, you may want to Erase all existing rays using the AutoCAD ERASE command and crossing to clean off all old traces. Answering Yes to "Erase last raytrace (Y/N)" only erases the last raytrace. Prior traces may lie underneath. The OPTimize subcommands: command covers the following
79 82 85 88 94 97

Focus group (automatic focusing) ..... Page Collimate group (automatic collimation) ... Page Curvature optimizing (change curvature radius) ... Page Adjust (study ray intersections) .. Page Rotate . Page Mode (choose trace mode) . Page

There are two types of optimization: Type 1: Curvature optimizing RayCAD will automatically adjust curvature variables like radius, conic and aspheric constants in an attempt to bring two rays to a point.
Don't forget, if the outcome is not what you are looking for, typing U for Undo on the command line will restore your design as it was.

Type 2: Positioning optimization RayCAD will automatically move a group of surfaces using a Lead surface for its direction in an attempt to bring two rays to a point or a parallel. Note: When Optimize moves a group to a new position the body, if any, with a block insertion point coinciding with

75

Chapter 4

the insertion point of the surface being moved, will tag along. Note: Since a change in curvature can cause the body not to fit, use the ERASE command either before or after optimization to erase the old body, then use the BODY command to make a new body that fits. See Body command on page on page 51 for more information. For some OPTimize commands, the surface selection routine requires input of a Leader, a Target and a Group which is accomplished by using the Optimize Parameters dialog box.

The optimization mode chosen is shown in the upper right hand corner. Coefficients in the "Optim on" column are only active if you chose curvature optimizing. In the case of curvature optimizing, the "Leader" is the surface to be optimized. In a positioning optimization, the "Leader" is used to give direction of the upcoming move.

76

Commands - Optimize Command

"Target" is the surface on which the result of the ray traces are evaluated. "Group" is a surface or a group of surfaces (up to 32) that will follow the leader as it moves. "Group" is grayed out in the curvature optimizing mode. The optimizer routine will trace two input rays through your surfaces until the target surface is intersected. The program will then make a correction by moving the Leader and the Group or modify the surface shape.
Program keeps cycling

As optimization takes place, three sets of numbers are displayed: Spread, Last Spread and Scaler. These numbers indicate distance between intersection points on the Target and the scale used for the adjustment. The program will continue to adjust the component's location to a point where the changes are less than one in ten million. In some cases, it is not possible to get that close to an optimum and the program will keep cycling in it's attempt. When this situation occurs, the numbers will keep repeating a pattern. Press the ENTER key to stop the optimizing process. Note: If more than two rays were gathered for your last ray trace, you are prompted with the following message to gather the exact two rays needed for the optimization. With the proper selection of input rays, you can study focus location produced by certain areas of your optics (i.e. marginal rays vs. paraxial rays). For information on gathering rays, see Inputray|Gather on page on page 64.

Press the ENTER key to stop

77

Chapter 4

Note: Beamsplitters present a unique case. Since the OPTimize command uses two rays and, for example, a 50/50 beamsplitter would let the first ray through and not the second ray, the two rays never meet up at the target surface. The solution is to use the SURFace|Editsurf dialog command and set the percentage of pass through to zero or 100 depending on which ray path you are optimizing. Once optimizing is accomplished, restore the percentage. Note: When optimizing in non-sequential, the optimize process can cause rays to miss a surface or intersect with another surface causing confusion. Switching to sequential mode (making sure surface numbering sequence is correct) can cure this problem. Note: If you have an unsuccessful optimization, the new surface location may give you a hint to the nature of the problem. Use U for Undo until your original surface location is restored. Note: Conditions can be possible where adjusting components cannot accomplish a focus or collimation. In this case, a curvature change will be required. Other times it may be required to move more than one surface.

78

Commands - Optimize Command

RayCAD|Optimize|Focus group Focus group will attempt to position a group of surfaces so that the two rays come to a single point on the target. You can use supplied drawing RAYCAD3.DWG to follow along with our example of this command.

Select RayCAD|Optimize|Focus a group. Optimize parameters dialog box appears.

79

Chapter 4

We will make SURF-6 the Leader and SURF-7 the Target. In the "Active Surfs" selection box, select SURF-6. In the "Aim Setting" window, click on Set Leader. In the "Active Surfs" selection box, select SURF-7 and click on Set Target. Press OK. Note: It is possible for a surface to be both a Target and a Leader. For example, to bring a Screen to a focus position, assign the Screen as a Leader and clear any Targets. For the example we use wavelength 587.6 As optimization takes place, three sets of numbers are displayed: Spread, Last Spread and Scaler. These numbers indicate distance between intersection

80

Commands - Optimize Command

points on the Target and the scale used for the adjustment. The program will continue to adjust the component's location to a point where the changes are less than one in ten million. Note: In some cases, it is not possible to get that close to an optimum and the program will keep cycling in it's attempt. When this situation occurs, the numbers will keep repeating a pattern. Press the ENTER key to stop the optimizing process. Rays are drawn and surfaces are moved to the new location.

81

Chapter 4

Drawing in progress. "New location for surface is" (11.5583 2.85641 0.0) Command: Notice that the Mirror (SURF-6) has moved. RayCAD|Optimize|COllimate group COllimate group attempts to make the two rays approaching the target parallel. You can use supplied drawing RAYCAD2.DWG to follow along with our example of this command.

Select RayCAD|Optimize|Collimate group Optimize parameters dialog box appears.

82

Commands - Optimize Command

We will make SURF-3 the Leader with SURF-2 to follow (Group) and SURF-4 the Target. In the "Active Surfs" selection box, select SURF-3. In the "Aim Setting" window, click on Set Leader. In the "Active Surfs" selection box, select SURF-2 and click on Set Group. In the "Active Surfs" selection box, select SURF-4 and click on Set Target. As optimization takes place, three sets of numbers are displayed: Spread, Last Spread and Scaler. These numbers indicate distance between intersection points on the Target and the scale used for the adjustment.

83

Chapter 4

The program will continue to adjust the component's location to a point where the changes are less than one in ten million. In this example you will find that the Spread and Last Spread are repeating at zero while the Scaler unit has not reached it's lower limit. Press a key to stop the optimization cycle since the two rays are parallel. They could become more parallel by letting the optimization keey cycling or place a target far away. Note: In some cases, it is not possible to get that close to an optimum and the program will keep cycling in it's attempt. When this situation occurs, the numbers will keep repeating a pattern. Press the ENTER key to stop the optimizing process. Rays are drawn and surfaces are moved to the new location.

84

Commands - Optimize Command

Drawing in progress. "New location for surface is" (7.58644 3.0 0.0) "New location for surface is" (6.58644 3.0 0.0) Command:

SURF-2 and SURF-3 have moved into a position allowing outputs to be parallel. RayCAD|Optimize|Curvature optimizing Curvature optimizing allows optimization of radius, conic constant K, and aspheric coefficient A1, A2, A3, A4. The surface selection routine requires just two surfaces: the one to optimize (Leader) and a Target. Select the variable to optimize. Your options depend on the type of surface. For example, an aspheric surface uses all of the variables, spherical only uses a radius. Upon completion, the surface is redrawn using the new data and a final ray trace is done. Since a change in curvature can cause the body not to fit, use the ERASE command when finished with OPTimize to erase the old body, then use the BODY command to make a new body that fits. You can use supplied drawing RAYCAD4.DWG to follow along with our example of this command.

85

Chapter 4

Select RayCAD|Optimize|Curvature optimizing Optimize parameters dialog box appears.

Making SURF-2 (an aspheric) the Leader allows optimization of the conic constant K and coefficient A1, A2, A3, A4. Here we chose K conic. Make SURF-4 the Target.

86

Commands - Optimize Command

In the "Active Surfs" selection box, select SURF-2. In the "Aim Setting" window, click on Set Leader. The "Optim on" window becomes active. conic. Click on K

In the "Active Surfs" selection box, select SURF-4 and click on Set Target. Press OK. For the example we use wavelength 587.6 As optimization takes place, three sets of numbers are displayed: Spread, Last Spread and Scaler. These numbers indicate distance between intersection points on the Target and the scale used for the adjustment. The program will continue to adjust the selected variable to a point where the changes are less than one in ten million. Note: In some cases, it is not possible to get that close to an optimum and the program will keep cycling in it's attempt. When this situation occurs, the numbers will keep repeating a pattern. Press the ENTER key to stop the optimizing process. Rays are drawn and surfaces are moved to the new location.

87

Chapter 4

Drawing in progress. Command:

RayCAD optimized the conic constant K for focus. RayCAD|Optimize|Adjust Adjust provides a way to study ray intersections. You can view a slice of rays (preferably many rays - 100 or more) and slide this cross section up and down along the normal of a selected surface. The slice cuts through all of the layout. Use ZOOM to isolate the portion with the ray of interest. This provides an easy method to find the best location for the surface.
Run Random Ray 2 or 3 times

Note: In order to have a good display of intersections, you should have many (100 to 200) rays going through this surface. The Grid command can automatically produce a large number of uniform inputray patterns or run Random ray 2 or 3 times to get lots of rays to look at. However, depending on your computer's speed, you may want to reduce the number of rays for the most responsive display. You can use supplied drawing RAYCAD4.DWG to follow

88

Commands - Optimize Command

along with our example of this command.

Select RayCAD|Raytrace|Option First we want to do a ray trace using the Grid trace command in order to have a good display of intersections. See page on page 102 for detailed information.

89

Chapter 4

Set the height to 10 and the width to 10 to produce 100 rays. Press OK. Select RayCAD|Raytrace|Grid

Ray trace completed with 100 rays. Select RayCAD|Optimize|Adjust Use the Surface Selection dialog box to choose the surface you want to slide back and forth. In this case we choose the screen Surf-4 to adjust. Select all 100 rays. Select rays for viewing... Select objects: First corner: Other corner: 100 found. Select objects:

90

Commands - Optimize Command

A view looking directly at the surface, with a slice of the layout centered around this surface, is displayed. The thickness of the slice is controlled by the Depth command (defaults to 0.1). Depth can illustrate what depth of focus looks like. Adjustment offset 0.0000: /Adj size/Depth/Zoom/Pan/Reverse/eXit/ < Go >: Zoom Adjust zoom scale factor <1>: 4.0

We set the zoom scale factor by typing 4.0. The slider can also be used for Zoom. The Zoom option magnifies the selected surface. Pan allows you to move the display window in any direction and not change the magnification. Adjustment offset 0.0000: /Adj size/Depth/Zoom/Pan/Reverse/eXit/ < Go >: Go

Pressing Go displays a new slice which is offset by the value controlled by Adj size. Repeated use of Go will step in and out of the screen. Use Reverse to change direction.

91

Chapter 4

The distance from the surface you selected to the slice is shown above the command line as "Adjustment offset". When value is 0.0, the surface is visible. If the surface is curved, you may only see part of the surface since the rest falls outside the slice. Note: If you choose the last surface, you can only adjust toward the rays. Rays stop at the last surface. Adjustment offset 0.5000: /Adj size/Depth/Zoom/Pan/Reverse/eXit/ < Go >: Go Adjustment offset 1.0000: /Adj size/Depth/Zoom/Pan/Reverse/eXit/ < Go >: Go Note: To reverse direction of adjustment, click on Reverse and press Go.

Adjustment offset 1.5000: /Adj size/Depth/Zoom/Pan/Reverse/eXit/ < Go >: X

Exit leaves the adjustment section of Adjust and prompts for following exit commands:

92

Commands - Optimize Command

View prior to Adjust is saved as RAYADJ. Ready to leave Adjust.../Place surface/Restore view/eXit <X>: P

Place surface moves the surface to the location last produced by Adjust. New location for surface is (10.9923 3.0808 1.5) View prior to Adjust is saved as RAYADJ. Ready to leave Adjust.. /Place surface/Restore view/eXit <X>: R Command: Restore view brings back view prior to entering Adjust.

Notice that the Mirror (SURF-6) has moved. Note: Use Surface|Sfnumber|Onlabel to update the surface number to it's appropriate location.

93

Chapter 4

RayCAD|Optimize|Rotate The Rotate command provides a means of rotating your optical surface and immediately retrace all of your input rays. You can use supplied drawing RAYCAD3.DWG to follow along with our example of this command.

Select RayCAD|Optimize|Rotate Using the Surface Selection dialog box, choose the Mirror Surf-6 to rotate. Base point ins

Any point can be used for a base point. In this case, we

94

Commands - Optimize Command

pick the center of the surface. Type INS on the command line. of

Point to SURF-6. Hint: Using AutoCAD ZOOM makes it easier to pick the surface itself and not the body. Usually the body insertion point coincides with the surface insertion point. Reference point END

We are using an existing ray as our reference. Type END of

Point to the far end of the existing ray.

New angle:

You can type the angle relative to the reference ray or you can point. For example, to raise the ray 1" on SURF-7, the mirror needs to rotate 1/2 that amount. Point to a distance 1/2" away from existing ray (See Ref. 1 in drawing below). Rays are drawn and the Mirror (SURF-6) is rotated.

95

Chapter 4

Drawing in progress. Command: Note: Use ERASE to remove the old body of SURF-6 then use the Body command to add a new body. Note: Sometimes you may find it easier to use AutoCAD's ROTATE command where you can rotate the body along with the surface or many surfaces and then use Raytrace to produce a new trace.

96

Commands - Optimize Command

RayCAD|Optimize|Mode Mode affects the way the program looks for and decides on the surface to intersect next. If your design has a predictable ray path and surface sequence, you may want to select Sequential. This mode is the quickest since a search for an intersection point is confined to the next number in a sequence and, when the last surface is reached, trace is terminated. In Non-sequential mode, all surfaces are interrogated for an intersection point. The surface with an intersection point closest to the last starting point of the input ray is used. In some layouts you must use the non-sequential mode, i.e. any time you have multiple ray paths generated by a beamsplitter or multiple surface intersections (the multiple surface intersections rule does not apply to fibers or hollow waveguides. They trace fine in sequential mode). Note: The current mode is shown on top of the command prompt. The sequential vs. non-sequential mode is saved in the RAY.INI file and will be the default for the next editing session.

97

Chapter 4

RayCAD|Optimize|Mode

The "Grid Setting" window is used by the Grid trace command. The value in the Height and Width edit boxes is used to divide your first surface (SURF-1) into rows and columns. In this case, 25 rays would be generated. The Width corresponds to the X Y plane and the Height is laid out in the Z direction.

98

Commands -Raytrace Command

RAYTRACE COMMAND
RT is a shorthand command for Raytrace and can be called directly from the command line. The Raytrace command covers: Trace (tracing of rays) ........ .......... Grid ................................... ........ Random (visualize the light path) .... Option ........................................ ... Spot (see image formation) .............. Page Page Page Page Page 100 102 102 103 104

Raytrace searches data base for blocks named SURF-nr (starting with SURF-1 to SURF-nr) and look up X Y Z location, rotation and twist. It will also read attributes for index data then write this to a file named SURF.DAT. Raytrace calls RAYW.EXE, a "C" program, to do calculations. RAYW.EXE returns X Y Z coordinates representing ray to surface intersections and saves this in a file named RAY.DAT. It will then draw 3D polylines between the coordinates. The color of the trace defaults to the current color setting in AutoCAD. However, the trace color can be modified from the INPutray command using Gather. For more information, see INPutray|Gather on page on page 64.

99

Chapter 4

Note: See Display|Dataprint on page on page 56 for detailed display of intersections and ray directions.
You can interrupt the ray trace at any time by pressing any key

If there are no display settings activated, a string of surface numbers are displayed (default). This will show you if a ray is stuck bouncing between two surfaces. Pressing any key at that point will produce this prompt: Raytrace is paused /Continue/Next Ray/eXit/ <X>:

Any time a particular ray makes more than two hundred intersections, a note indicating "Ray NR n has made 200 intersections" and the above prompt is generated. RayCAD|Raytrace|Trace Choosing Trace will begin the tracing of rays. Note: Change trace mode to sequential or non-sequential by using the Option command. Each input ray is projected into 3-D space. If a ray intersects a surface, the point of intersection and the surface normal at that point are calculated. In Non-sequential mode, all surfaces are interrogated for an intersection point. The surface with an intersection point closest to the last starting point of the input ray is used. In Sequential mode, the next surface sequence number is

Ray trace is drawn

100

Commands -Raytrace Command

used and trace will terminate if no intersection exists. At each intersection point, the ray direction is then changed according to the type of surface encountered. This point and new direction become the start point for the next ray projection. Note: Rays will terminate when there are no more surface intersections found. Therefore, if you find rays terminate prematurely, they are most likely missing the next intended surface. In this case, if you insert one or more large screens in your design , you can catch these rays by seeing where they go. You have the option of erasing your last ray trace. Raytrace will return a message "No rays drawn" in the case of: - no input rays were gathered. See INPutray command on page on page 60. - less than two surfaces present. See SURFace| Makesurf command on page on page 116. - invalid index name.

101

Chapter 4

RayCAD|Raytrace|Grid The Grid command will produce rows and columns of input rays projected toward surface number 1 (SURF-1) and originating from the source point illustrated by the first input ray in your input ray selection. If the first two rays selected by the INPutray|Gather command are parallel, each ray produced by the Grid command will be parallel. The number of rows and columns are determined by settings in the Raytrace|Option command. Grid is very useful Optimize|Adjust command. orderly row and column command clearly illustrates distortions. in combination with the Since rays are produced in an fashion, the Optimize|Adjust spot size, aberrations and other

RayCAD|Raytrace|Random Random will use the random generator to produce a set of 50 input rays. and trace them all. The random generator can generate input rays forming two patterns - polar and parallel. The pattern used is determined by the input rays from the INPutray|Gather command. If the first two input rays are parallel, all rays generated will be parallel to your input rays and randomly distributed to fit inside the first surface (SURF-1). If the first two rays are not parallel, then the end of the first input ray furthest away from the first surface is used as a focus for all the rays and the direction is set so rays fit inside the first surface.

102

Commands -Raytrace Command

SURF-1 must be present in the drawing

The generation of many rays helps to visualize your light path. It can be useful in testing a field stop by filling the area with rays. RayCAD|Raytrace|Option The Options Trace Settings dialog box allows you to change the Trace Mode to sequential or non-sequential and affect the Grid setting.

If your design has a predictable ray path and surface sequence, you may want to select Sequential. This mode is the quickest since a search for an intersection point is confined to the next number in a sequence and, when the last surface is reached, trace is terminated. In Non-sequential mode, all surfaces are interrogated for an

103

Chapter 4

intersection point. The surface with an intersection point closest to the last starting point of the input ray is used. Values entered in the Height and Width edit boxes are used by the Grid command. Note: All settings are remembered for the next editing session. RayCAD|Raytrace|Spot The Spot command helps to visualize the image formation of your ray trace. Many spots are projected onto a target that you select. Note: The Spot command only needs a target. Note: Accessing the following commands from the top pulldown menu calls the desired command and leaves you in a command line menu where you can interactively draw spots, change size and colors, etc. When finished, press ENTER to eXit.

104

Commands -Raytrace Command

Since spots are placed on a surface, make sure that your viewing angle is set in such a way that the face of the surface is visible. Looking straight down on a surface won't show you any spots since they have no thickness. As part of the main spot menu you will find the Clip command helpful in viewing the spots. The random and the grid input ray generators are used to produce the input rays needed to compute the spots. In the following, we will first use the Clip command to give us a viewable surface. RayCAD|Raytrace|Spot|Clip RayCAD|Raytrace|Spot|Unclip Use the Clip command to view the target surface end-on. Everything in front and behind it is clipped off. The Unclip command takes you back to the view before the Clip command was used. RayCAD|Raytrace|Spot|Front RayCAD|Raytrace|Spot|Back The distance in front and back can be modified through the Front and Back command (default is 0.05). You may need to increase these distances if you are looking at a curved surface as some of the spots may fall outside the viewing slice.

105

Chapter 4

RayCAD|Raytrace|Spot|Grid spots Grid spots produces uniform rows and columns of input rays. Note: Spots may not show depending upon your view direction. See Spot|Clip on page on page 105 for information. RayCAD|Raytrace|Spot|Random spots This command will randomly pick an input ray direction and will produce 200 spots.

106

Commands -Raytrace Command

RayCAD|Raytrace|Spot|Point style The Point style command allows you to change the spot shape and size.

107

Chapter 4

RayCAD|Raytrace|Spot|Color COlor allows you to change the color so that if you use Grid spots or Random spots again, the new spots can be distinguished from prior spots.

108

Commands -Raytrace Command

RayCAD|Raytrace|Spot|Zoom Use the Zoom command to get a close up of your spots. The Zoom command is transparent and can be used at any time. Note: Before leaving the Spot command, you may want to Unclip to restore view. The RayCAD|Display|Restore scrn can always be used. See page on page 58. RayCAD|Raytrace|Spot|Options This is the same dialog box used in the Optimize|Mode and Raytrace|Option commands. For details, see pages on page 97 and on page 103.

109

Chapter 4

REMOVE COMMAND
RE is shorthand for REmove and can be called directly from the command line. REmove discards a selected surface anywhere in the sequence and then fills the vacant place by renaming the rest.
Use Sfnumber labels

It can be most helpful if you turn labels on by using RayCAD|Surface|Sfnumber|Onlabel before you begin REmove. This makes it easier to see exactly which surface(s) you want to eliminate. Note: If you are trying to remove half of a doublet lens, it can be difficult by pointing to determine which surfaces to remove since two surfaces in the doublet will be on top of one another. By using the number given by RayCAD|Surface|Sfnumber|Onlabel you can easily select the correct surface part of the doublet to discard.

Select by pointing to body

Note: The body is not part of the surface block itself. However, it is possible to pick a surface by pointing to the body. The program will select a surface with an insertion point coinciding with that of the body. In a two surface component, the body insertion point is that of the last entered of the two surfaces. Important! If removing one part of a two surface component, make sure that another surface with matching index is put in its place or remove the second surface, too.

110

Commands - Remove Command

RayCAD|Remove|Remove renumber Remove renumber will rename existing surfaces to close gaps in the number sequence. RayCAD|Remove|Erase Erase merely erases the surface block but it is still present in the database and will leave a gap in the number sequence. This is not a problem for either sequential or non-sequential ray tracing and later, when making a new surface, you can simply give it the number of the gap and it will fill it. Note: When Remove encounters an erased surface, it will rename it "OLDSURF-n". After many repeated Erase and Remove renumber there will be many OLDSURF-Ns in the database. You may want to clean up your database by using PURGE BLOCK as the first thing in an editing session for Rel. 12. Rel. 13 can be PURGE'd at any time. Don't be afraid of answering Yes to the purging of OLDSURF-N and BODY-N. If any surface is currently used in your drawing it will not be listed and cannot be purged.

111

Chapter 4

SURFACE COMMAND
SF is a shorthand command for SURFace and can be called directly from the command line. The SURFace command let's you select optical component types and index table, either by using self constructed components or from a vendor catalog. You can look at the attributes of a surface, change those attributes, make a copy of a surface, and assign on-screen number labels. Summary of SURFace command:
Makesurf (user created surfaces) ... . .. Catalog (from optical catalog) ............. . Sfnumber (affects surface numbering) ... ... Listsurf (info on surfaces) ..................... ... Editsurf (change surface characteristics) ... Clone (duplicate a surface) ........ ...... . Redraw (update a surface block) ............ .. Deactivate (exclude surface(s) from Raytrace) Activate (reverses Deactivate) .. Export ....................................................... Import ....................................................... Page Page Page Page Page Page Page Page Page Page Page 116 145 146 149 150 151 152 153 153 153 153

112

Commands - Surface Command

Coordinate System Our samples and descriptions are described as if the work is in a world (top) view, looking down on the design and components are placed from left to right in the X direction. For the next illustration you can open sample drawing RayCAD3.dwg and use RayCAD | Display | Viewports and place cursor in the isometric view to make this the current view. Type UCS World to place UCS in a World coordinate. Command: UCS Origin/ZAxis/3point/OBject/View/X/Y/Z/Prev/Restore /Save/Del/?/<World>: W

113

Chapter 4

The HIDE command was used to make the UCS icon more visible for the illustration.

The coordinate system consists of a lab coordinate and a local coordinate. The lab coordinate corresponds to the UCS (User Coordinate System). The local coordinate applies to a single surface where the normal at the origin extends in the Z direction, height in the Y direction and width in the X direction. To illustrate this, make sure UCSICON is set to Origin. If not, on command line type UCSICON Origin. To set UCS to a local coordinate, type UCS OBject for Object. Command: UCS Origin/ZAxis/3point/OBject/View/X/Y/Z/Prev/Restore /Save/Del/?/<World>: OB

114

Commands - Surface Command

Good Advice Before you begin to insert components, it pays off to organize your layout. Under the Display command you will find ways that arrange your screen to three view ports - one being a world (top) view, one a front view, and one an isometric view. You don't have to use these views. Surfaces can be inserted anywhere. As a reminder, set the SNAP and UCS before beginning the insertion. The snap size should be set to match your design. The RayCAD|Display|Restore scrn command restores the screen to a single view port with a World coordinate, removing any screen clipping and isometric viewing. This may be a good start for a new layout.

Preparing your drawing

115

Chapter 4

RayCAD|Surface|Makesurf Makesurf is used to create optical components using your specifications. Be sure to verify that your creation can be manufactured. Summary of Makesurf: Pass-Through surfaces ............................ 117 Refractive surfaces .................................. 120 Index Data ............................................... 124 Medium ................................................... 130 Refractive .. ................... 120 Diffractive surfaces.................................. 131 Reflective surfaces .................................. 133 Contour of surface .................................. 134 Component thickness .............................. 141 Surface name ........................................... 141 Defining second surface .......................... 142 Rotating surface ...................................... 143 Some components are single surfaces, others are double surfaces. For example, a lens has two surfaces and a mirror has one surface. Each surface is made into a block. This means that the two surfaces of a lens are not attached in any other way than they share the index name and they are named in sequence. Because surfaces are separate blocks, this allows for independent rotations and spacing. After a component is completed, body is applied to each surface to give it the look of a whole component. See Body on page on page 51 for further details. Note: If another surface is placed in the middle of a lens,

116

Commands - Surface Command

you can count on an unexpected result. Surfaces can be divided into categories depending on their Pass-Through, Refraction, interaction with light: Diffraction, Reflection. The following section is separated according to these categories. An example of each is provided and also serves as an index to shared subcommands. Pass-Through Surfaces Pass-Through surfaces include: Aperture, a round or rectangular hole in 3D space that allows light to pass through. In sequential mode, rays missing the aperture are terminated. In non-sequential mode, rays missing the aperture will not intersect but will continue. However, if the aperture is used in conjunction with a baffle, rays missing the aperture will be blocked. Baffle, an opaque surface. Use this any where to block rays. If an aperture is placed on top of a baffle, it becomes a hole in the baffle. Screen, a surface that can be inserted anywhere in your optical layout since it does not change ray direction. Used primarily to study ray intersection and image formation. Also used for projection of spot diagrams. Many times used as the last surface.

117

Chapter 4

This example will illustrate the Makesurf command using an Aperture (Pass-Through). Select RayCAD|Surface|Makesurf|Aperture
Using SNAP helps in precise placement

Place center of surface location: Use your pointer to place surface or key in coordinates.

To produce a rectangular shape, click on Rectangle. Enter in the height and width and press OK. First free Surface number is 1. Surface Number.. Enter any number <1>: 1

118

Commands - Surface Command

Aperture opening can be placed into a BAffle. Do the baffle definition now...(Y/N) <Y>: N
Prompt for baffle

If choosing Yes, a baffle would be placed at the same insertion point as the aperture. Multiple apertures can be placed on a baffle to create holes. The aperture and baffle surfaces must line up such that the ray intersection between the two surfaces is less than 1 * 10-6. Here we type N for No. The completed Aperture is shown below.

For information on Surface|Sfnumber, see page on page 146.

Note: The surface label (SURF-1) can be turned on or off.

119

Chapter 4

Refractive Surfaces Refractive surfaces include: Beamsplitter, two types are provided, one being a long and short wavelength pass, the other having a partial reflection. Fiber consists of two cylindrical rods that can be placed in drawings independently of each other but a ray trace starting in one end will exit the other. Fresnel, a lens resembling a plano-convex or planoconcave lens that is cut into narrow rings and flattened out. Lens, a refractive, two surface component. PLates, a refractive component consisting of two flat surfaces. Also used for construction wave guides. Prism, a dispersing, transparent component consisting of two surfaces. Tube, a single surface used with other refractive surfaces to model holes or rods. We will use a Lens (Refractive) to illustrate the Makesurf command. The input required is typical for all refractive components. Refractive surfaces requiring unique input is described on page 135.

120

Commands - Surface Command

Select RayCAD|Surface|Makesurf|Lens Place center of surface location: 2,1,0


SNAP (F9) and ORTHO (F8) help in precision placement

Use your pointer to place surface or key in coordinates. The Glass Selection dialog box appears. Here you control the medium and select glass type.

121

Chapter 4

For information on Medium, see page on page 130.

For details on Source of Index, see page on page 124. Note: Medium defaults to the index of air. For Source of Index Data, we chose Schott1.ind A-K which allows you to choose an index from a supplied list. Pick BAK-1, then press OK. Note: If you were making a Fiber, you would select a material for the core and then are prompted for a material for the cladding.

122

Commands - Surface Command

For more information on contour, see page on page 134.

The contour of the first surface of the Lens we will make spherical with a diameter of 2.0. For surface curvature, we made the radius 3.0. Press OK. Component thickness.. Center to center (not the edge) <0.5>: 0.5

For detailed information on Thickness, see page on page 141

Make the thickness 0.5.

First free Surface number is 1 Surface Number... Enter any number<1>: Enter

For detailed information, see Surface Name on page on page 141.

Because the Lens is the first surface drawn, it is named SURF-1. Press ENTER to accept.

Second surface's definition..(Y/N) <Y>: Yes

For detailed information, see Defining Second Surface on page on page 142.

Construct the second part of the surface. Make the contour Spherical and keep 2.0 diameter. Change the curvature to Concave. Press OK.

123

Chapter 4

The completed Lens is shown below. This is the end of the Lens example.

Index Data Each refractive surface has an index file name and a name of the glass type saved as an attribute with the surface block. The Glass Selection dialog box is used for selecting

124

Commands - Surface Command

glass manufacturers and glass types. When a glass name is chosen, the information about the particular glass is shown in the lower portion of the dialog box. Source of Index data: Schott, Corning or ZEMAX: Allows you to choose from glass manufacturer (Corning and Schott) or a ZEMAX compatible index file. Note: If you wish, you can add index tables to the file RAYCONST.INX. This file contains all the information necessary to calculate the index for a particular wavelength using one of two formulas. To show what the RAYCONST.INX file looks like, the following is an excerpt. Each line contains: Glass name (when 2 names are on 1 line, they are equivalent) Formula 1 or 2 6 numbers (A0 - A5) which are the constants for the dispersion formulas Media index
GLASS NAME A63-65 A86-82 A87-70 A87-84 B10-63 B11-60 B16-64 B18-60 B18-65 B23-59 GLASS NAME FK-3 FK-52 FK-5 BK-1 K-7 BK-7 BALK-N3 PK-2 K-5 FORMULA 1 1 1 1 1 1 1 1 1 1 A0 2.121650 2.185857 2.188523 2.188331 2.250616 2.250586 2.271176 2.272935 2.275718 2.287966 A1 -9.503490E-03 -5.201463E-03 -9.598334E-03 -5.365878E-03 -9.247589E-03 -8.155770E-03 -9.700709E-03 -9.344543E-03 -9.777224E-03 -9.829138E-03 A2 8.318686E-03 8.107487E-03 8.635329E-03 7.743657E-03 1.099293E-02 1.218439E-02 0.0110971000 1.182611E-02 1.105575E-02 1.111679E-02 A3 3.339573E-04 1.008583E-04 2.395636E-04 1.312934E-04 6.033767E-05 -8.656369E-05 4.622809E-05 7.960521E-05 1.910096E-05 3.82463E-04 A4 -2.364166E-05 -2.224178E-06 -1.547314E-05 -7.417952E-06 1.460288E-05 3.749854E-05 1.616105E-05 1.382893E-05 1.949133E-05 -2.412558E-05 A5 9.972179E-07 1.919751E-07 6.879645E-07 4.581512E-07 -7.160412E-07 -1.850241E-06 -8.285043E-07 -4.952685E-07 -1.015542E-06 1.418343E-06 MEDIA 1.0003 1.0003 1.0003 1.0003 1.0003 1.0003 1.0003 1.0003 1.0003 1.0003

125

Chapter 4

Using the existing file as a guide, you can insert a similar line for a glass not available from the supplied file. The refractive index of a glass in the wavelength range of 365 to 1014 nm was calculated from the following formula (from Melles Griot - Optics Guide 5): Formula 1 n = A0 + A1l + A2l + A3l + A4l + A5l
2 2 -2 -4 -6 -8

Here the wavelength, is in microns, and the constants A0 , through A5 are given by the manufacturer for each different glass. This equation yields a value for index that is accurate to 3 x 10-6 between 400 and 750 nm, and accurate to 5 x 10-6 from 750 to 1014 nm.

For shorter wavelengths, the refractive index was calculated from the following formula (from Melles Griot Optics Guide 5): Formula 2
n2 1 =
2 A0 2 2 A1

2 A 2 2 A3 2

2 A4

A5
2

126

Commands - Surface Command

User File.Inx: Allows you to use an index file generated by you to enable specialty glass, plastic, etc. to be used. Some index tables are supplied by RayCAD. A file created with Single can also be recalled here. If the index file found has 1 set of data points (Single), RayCAD uses that wavelength and index. If the index file found has 4 through 50 sets of data points, RayCAD extracts 4 sets of data surrounding the wavelength specified from the INPutray|Gather command and does a power fit to return an index. A dialog box to Select Index File appears. choose the index file you want. Here you

If you selected Fiber, RayCAD requests a file to contain index for the cladding. If you want to create your own index table to be used with Inxfile, this can be accomplished by using any editor. Use a supplied index file as an example of the format.

127

Chapter 4

The following example shows the first four data points in an index file. Note that the first line must be the Gas Index. The second line must be a wavelength, the next its associated index, and so on. The maximum set of index values and wavelengths in an .INX file is 50. Program will print the following message if more than 50 sets of data are encountered: !!!Only the first 50 sets of Index data are used !!!. If you desire, comments can be placed on a line in .INX if proceeded by a semi-colon. It is okay to have empty lines in your Index Table.

A Powerfit calculation will fit desired wavelength to an excerpt of the table, Power curve fit; y = ax^b (a>0). If Display|Dataprint has been activated, a r^2 value is printed for each wavelength and represents the coefficient of determination. A r^2 close to 1.00 indicates a better fit than values close to zero.

128

Commands - Surface Command

b=

(In x)(In y) (In x)

b In xg In yg b n b In xg2 2

a = esp

/ / b In ygn bb In xgn

r 2 =

L (In x)(In y) - ( In x)( In y) O2 M P n N Q L (In x) 2 ( In x) 2 O (In y) 2 ( In y) 2 O L M P M P n n M P M P N Q N Q


Make Single Wave.INX: Distinguishes itself from a regular index file in that only one wavelength, one index and one medium is required. It is for those who are frequently using a single wavelength (i.e., a laser). A .INX file is automatically generated. Since only one wavelength and one index is provided, no fitting of index is performed. NOTE: The Wave entered next will override Wave from INPut Gather command. The wavelength entered in the Single index file will override the wavelength supplied through the INPUTray|Gather command. The dialog box to Select Index File appears. Here you give the single index file a name so that it can be stored

129

Chapter 4

and called on later if desired. To use a file created from Single again, call it using INXFILE. Here's an example of how a Single index file looks: 1.003 ; 240.0 ; 1.51333 ; Gas Index Starts with wavelength in nm Associated Index

If you had selected Fiber, RayCAD requests a file to contain index for the cladding. RayCAD Original.INX: For compatibility to earlier versions of RayCAD, RayCAD Original is included. Medium: Change Medium if components are operating in a different environment than air (water, oil, vacuum, etc.). Note: A vacuum equals 1.000. Note: The medium is not wavelength specific. It is necessary to model space between glasses as surfaces with their own index for greater accuracy.

130

Commands - Surface Command

Refractive surfaces requiring unique input


For further information on Beamsplitters, see page on page 120. Also, see the OPTimize command on page on page 75.

Beamsplitters need additional input. You will be prompted to Enter W for Wave dependent or a percentage to pass through If you want to choose a percentage, enter at the prompt. If you choose Wave dependent, next prompt requests you enter pass wavelength in nm. A beamsplitter is a two surface component and is treated as a pair. Fresnel is modeled and specified as a Lens. Conic and aspheric curvatures are valid. Diffractive Surfaces Diffractive surfaces include: Echelle, a high resolution, coarsely ruled grating that consists of one surface and is always flat. Grating, a holographic or ruled grating can be curved. Consists of one surface. Transmission Grating, a transparent diffraction grating that serves to transmit light. A TGrating can be sandwiched between 2 glass plates. Note: If a grating is added to one side of a transparent material, a small space must be created between the 2 surfaces in the order of 1.0e-4 to 1.0e-5 depending upon the thickness of the emulsion.

131

Chapter 4

Makesurf command using a Grating (Diffractive): Select RayCAD|Surface|Makesurf|Grating Place center of surface location:

Use your pointer to place surface or key in coordinates.

Use the Estimated Usable Orders evaluator to find a valid order. Since grooves, wavelength, angle of incoming ray and the order are interrelated, use the Estimated Usable Orders evaluator to find an appropriate order and enter this value into Order to Trace. Measure angle between surface normal and incoming ray. Enter a positive angle when grating rotation is counterclockwise measured from surface normal to incoming ray. The data in the Grooves/mm field and Order to Trace field will be part of the surface attribute. The wavelength and the angles are determined by the current wavelength and angle of actual trace. Note: For a ray trace to be successful, a correct combination of grooves, blaze angles, wavelengths, orders

132

Commands - Surface Command

and rotation of diffractive components is important.


See "Appendix CTroubleshooting, Grating/Echelles" and "Glossary, Orders" for more information.

Echelles and gratings can only produce diffractions when angles and wavelength ranges are not violating the diffraction formula. Note: Follow the instructions for a regular grating in the use of TGratings. Reflective Surfaces Reflective surfaces include: Hollow Waveguide consists of two cylindrical rods that can be placed in drawings independently of each other but a ray trace starting in one end will exit the other. Mirror, a reflective component consisting of one surface. Reflector, a curved reflective component that can have a hole in the center. A reflector can only be round. Note: If a rectangular reflector is needed, use a mirror instead of a reflector. The only difference between a mirror and a reflector is that a reflector is drawn as a multi-wire mesh and can only be round and has no thickness. A mirror prompts for a thickness which, if supplied as a zero, will not add a body to it. Use the Contour Maker dialog box to enter contour, diameter, hole size (if any) and to specify round or rectangular.

133

Chapter 4

Contour From a default Contour dialog box, several specialized curvature dialog boxes can be accessed. Use the "More Shapes" pull-down menu to select the curve you need. Some components limit the selection. For example, an aperture can only be flat. These dialog boxes allows for a visual way of creating curves and are used in both generation of new surfaces and editing of existing surfaces. The Aspheric dialog is unique in that all contours can be entered through it. Conic Parameters Slider and Edit Boxes: Radius and five coefficients can be controlled by clicking up or down on the slider buttons. The contour display is updated each time a slider is activated. The colored + and - buttons will increment and decrement the digit acted on by the slider and it's setting is shown in the box titled Slides Scaling. The sliders can be made to operate continuously if Single step is disabled. Each variable is shown in the edit box to the right. Placing the cursor in the edit box allows for direct entering of values. Round and Rectangular Radio Buttons: Use these radio buttons to define the outside shape of your component. Rectangle mode is only valid when operating on a single surface.

134

Commands - Surface Command

Diameter, Hole, Height and Width Edit Boxes: Place cursor in edit box for direct entry of values. The diameter must be larger than the hole. Curve Pull-Down: This shows convex, concave and flat. When generating new surfaces, select the appropriate curvature. In the case of convex and concave, you will see no change to the dialog box. But, if concave was picked, the surface will be spun around 180 degrees when the surface is finally generated. Show Button: Press this any time to update the contour display. "Contour is" Display: Lower left shows the current conic shape under the label called "Contour is". This status label will change as coefficients are being edited to reflect the current conic shape. Note: A error message is displayed when parameters are invalid. For example, generating a surface using a 1 inch diameter and a radius less than .5 will produce an error. Follow suggestions to correct the problem. Inputting a negative radius will cause the surface to be rotated 180 deg. upon insertion automatically producing a concave surface if viewed from the world (top) view with the rays traveling from left to right. Of course, in a three dimensional environment, the terms concave and convex will depend on direction of the light and direction of the surface. The radius extends in the same direction as the surface

135

Chapter 4

normal. Curvature allows you to enter the radius as 1/r (the reciprocal of the surface radius).
K, A1, A2, A3

Aspheric surfaces need not just a radius but also a constant "K" which gives the eccentricity of a conic surface and four aspheric deformation constants A1, A2, A3 and A4. The formula below describes a curve that, when revolved around the Z axis, defines an optical surface. A point S2 distance from Z axis will equate to z, the height along the Z axis.
z= cS2 1 + 1 (K + 1)c S
2 2
1/ 2

+ A 1S 4 + A 2 S 6 + A 3 S8 + A 4 S10

Where S2 = X2 + Y2 and c=1/radius Hyperboloid Paraboloid Ellipsoid rotated about it's major axis Sphere Ellipsoid rotated about it's minor axis K<-1 K=-1 -1<K<0 K=0 K> 0

136

Commands - Surface Command

Parameters for conic surfaces: The positions of the foci for the conic surfaces are functions of r and K and are given by the following relations and in illustration..
d1 = r K+ 1 r (2 K ) K+ 1 r (1 K ) K+ 1

d2 =

d3 , d4 = r 2

d5 =

d6 , d7 =

r ( K 1) K+ 1

137

Chapter 4

Figure 24

Samples of Isolating the r and K values


How to find values for r and K

The Contour Maker dialog box requires input in terms of the r and K values. Below are examples of r and K values for the illustration.. Sample of Ellipsoid from Figure 24a.:
If given d1 = 1575 and d 2 = 2.0 . K= d2 2 d12 4 r = d1 (K + 1)

Result is K = 0.403

r = 2.21

138

Commands - Surface Command

Sample of Ellipsoid from Figure 24b:


If given d3 = 3.0 (d3 d4 )2 (d3 + d4 )
2

d4 = 1.0 (K + 1)

K=

r = -d4

e-K - 1) j

Result is K - 0.25

r = 1.5

Sample of Paraboloid from Figure 24c:


If given d5 = 3.0 K = -1.0 and r = 2 d5 Result is K = -1.0 and r = 6

Sample of Hyperboloid from Figure 24d:


If given d6 = -1 -(d6 + d7)2 (-d7 + d6)
2

d7 = -2 (K + 1)

K=

r = d6

e K + 1j

Result is K = -9

r=2

139

Chapter 4

Eccentricity Constant K

Hyperboloid, Paraboloid and Ellipsoid need a radius and the eccentricity constant K. See formulas above for alternative input. Enter K, the conic constant K <-1.../<1.070>

COne is modeled from a surface of the type axicon represented by the hyperboloid with an extremely small radius. The K and diameter determine the length of the cone. It should be noted that the extreme tip of the cone forms the shape of a hyperboloid. Sphere and Cylinder require only a radius. Cylinder is inserted so that the central axis of the cylinder lies along the Z axis therefore affecting a light ray in the XY plane. If you want to use the cylinder affecting the rays in the Z plane, follow these steps to spin the cylinder around it's normal: After placement, and after exiting RayCAD, type UCS ENTRY. Point to the cylinder. This will cause the UCS to be set to the coordinate for the surface of the cylinder. Then type ROTATE. Point to the cylinder surface and type 90 for rotation. Type UCS PREVIOUS to get back to your normal user coordinate. Note: To change any of the parameters, use the SURface|Editsurf|Contour command. The new shape is redrawn to allow visual inspection and is ready to be traced.

140

Commands - Surface Command

Component Thickness Select the thickness of the component. This indicates the thickness from the center of the surface to the backside. In a two surface component, the thickness is the center point between the two surfaces. Note: Thickness is only used for the initial spacing of surfaces on a multi surface component. To later change the spacing between surfaces, use the AutoCAD MOVE command. The thickness value is inconsequential at this point. The Body command uses the thickness for single surfaces to draw the wire mesh. Editing of thickness only affects the thickness of the body - not the spacing between surfaces. If the component is a Fiber or Hollow Waveguide, instead of thickness, you will be requested for the Length of straight part of Fiber. Surface Name Each surface is made into a block named SURF-1 through SURF-nr. Ray is traced in sequence from 1 through n in sequential mode. In non-sequential mode, all surfaces are checked for an intersection point and the nearest intersection point is used - even if this is the surface itself. Note: In non-sequential trace mode, the order of the surface numbers are not important except in the case of fiber, hollow waveguide and beamsplitter. For fiber and hollow waveguide, the two ends must be numbered adjacent to each other. For beamsplitter, the backside

Thickness is not prompted for Aperture, Baffle and Screen as they have no thickness.

If surface's contour is to be cylindrical, you must select Height and Width for the size.

For visual aid in numbering, use Surfnr|Onlabel

141

Chapter 4

must be numbered adjacent to each other.


First free Surface number is nr. Surface Number..

Enter any number <nr>:


First free Surface number is nr and nr is available at the end. Surface Number...

Enter any number <nr>: The prompted <nr> is the first unused sequence number. It can be an empty location or at the end. Press RETURN to accept default or type free nr at the end to add a new surface to the end of the sequence. To insert a surface into an existing sequence, simply enter the number where you want the insertion to take place and all surfaces following it will be incremented by one. The same applies if you are using Catalog to insert surfaces. If you know the number in the sequence, just enter the number and the surface is inserted in that slot. Defining Second Surface A two surface component needs defining of the second surface. The second surface will assume the same Index and Size of the first surface.
See Helpful Hints, Curvature on page on page 161.

Select the contour and the second surface is drawn. The body is drawn between the two surface component. If you need to reposition or rotate one surface of a two surface component, just ERASE the body, use MOVE or ROTATE, then, when finished, use the Body command to redo the body.

142

Commands - Surface Command

For surfaces like Fibers, Hollow Waveguides and Beamsplitters, it is recommended that the second surface be defined when prompted. These types of surfaces need to have the surface numbers adjacent to each other. The program must treat these surfaces as a pair. A Plate can be used to construct wave guides, in which case you would give a zero thickness and may not want to define the second surface at the prompt. Different types of refractive surfaces can be combined to make complex objects. Tube can make holes and rods or holes in rods. Rotation Rotation of a surface is only requested at creation time for Prisms, Echelles, Fibers and Hollow Waveguides. At prompt for Rotation Angle, key in an angle or point. Convex curvatures are made concave by rotating the surface 180. If a positive radius is supplied, the surface will be inserted with the normal pointing in the X direction. If the ray trace is in the X direction this will be looked at as a convex surface. If, however, you supplied a negative value for the curvature, the surface is automatically rotated 180 providing you with a concave surface. Note: Supplying a negative curvature would have the same effect as if you supplied a positive curvature and then used AutoCAD ROTATE and rotated 180.
Grating rotation can be tricky

Gratings must be rotated according to their blaze angle.

143

Chapter 4

Groove facet must face the direction of the incoming ray. A text string is written on top of a grating indicating blaze angle. When the word blaze is able to be read, you are looking at the front face of the grating with the arrow pointing toward the blaze direction. An easy way to do this is to use the Display|Surflook command to view the grating in question head-on. The use of x y to step off the end-on view will enable you to determine the position of your inputrays relative to the grating. Also, the Hide command can be of help. Example: If a ray's direction is going from left to right (positive x direction) and an echelle grating blazed at 63.4349 (= atan 2) is inserted, you then have to rotate the surface approximately -63. This will insure the ruled facet to be facing the incoming ray. In this configuration, the -63 counterclockwise rotation, the face of the grating will face up (the surface normal points in a positive y direction). If your design requires the grating surface to face down instead of up, you CANNOT just rotate positive 63 because light would be striking the wrong side of the grooves. You will have to spin the grating 180 around its normal.
Rotating any surface

The UCS ENTRY command can be useful when rotating a surface. Type UCS ENTRY. Point to the surface you want to rotate. This will cause the UCS to be set to the coordinate for the surface. Now type UCS X or Y 90. This will turn the UCS 90 allowing rotation around the Z axis. Then type ROTATE. Point to the surface and enter the desired angle. Type UCS PREVIOUS twice to get back to your normal user coordinate. At the end of the SURFace command, a block is created.

144

Commands - Surface Command

The index file is saved as an Attribute. RayCAD|Surface|Catalog Catalog gives you access to over 600 lenses (including aspherics) that have been selected from major manufacturer's and distributor's optical catalogs. Using the Lens Catalog dialog box, choose the manufacturer by clicking the Browse...button. Pick a component and the details appear.

145

Chapter 4

Following is an example of a surface created from the Catalog of lenses.

Melles Griot - GLC diode CLC001 8 - 8 surfaces created. RayCAD|Surface|Sfnumber Choosing Sfnumber allows you to see surface labels, turn off surface labels, swap numbers on surfaces, assign a size for label height and rename surfaces. Sequence numbering is important for a sequential trace mode. The sequence is much less important in the nonsequential mode.
Non-sequential

In non-sequential mode, it is only important that a sequence is maintained for Beamsplitters, Fibers, and Hollow Waveguides. These components must be numbered adjacent to each other. In a sequential trace mode, a ray can enter each surface only once. Surfaces must be in a sequence of blocks named SURF-1 to SURF-nr. Empty sequence numbers are okay.

Sequential

146

Commands - Surface Command

The sequence of surface names and locations must be adhered to and maintained. For example, a ray traveling left to right will encounter SURF-1 first, and then SURF-2. If a mirror is encountered at SURF-3, the ray will reverse direction so that SURF-4 will have to be to the left of SURF-3. RayCAD|Surface|Sfnumber|Onlabel Onlabel shows the surface label of each surface on the screen. Also used to refresh labels. RayCAD|Surface|Sfnumber|Offlabel OFflabel hides all surface labels from screen and keeps them off. RayCAD|Surface|Sfnumber|Rename Rename allows you to change a surface label. RayCAD|Surface|Sfnumber|Swaplabel If surface numbers are out of sequence, use Swaplabel. This command allows you to swap surface numbers to put them back into the correct sequence. Using the Surface Selection dialog box, choose one surface to swap then choose other surface to swap number with. It is easy to check that surface numbers were swapped correctly by using Listsurf.

147

Chapter 4

RayCAD|Surface|Sfnumber|Close gap Close gap automatically renumbers each surface to maintain sequence. This is useful if you have erased a surface and want to fill the vacant place. RayCAD|Surface|Sfnumber|Labelsize Labelsize lets you set the label height for display in the drawing. Note: If a text style has been set to a height other than zero, you will see message "Unknown command. Type ? for list of commands". At this point, type U to Undo your last entry. See "Appendix C - Troubleshooting".

148

Commands - Surface Command

RayCAD|Surface|Listsurf
Information about surface.

The Listsurf command provides information about the selected surface, such as surface name, surface type, height, width, radius, etc., all of which were written into Attributes when the surface was created.

149

Chapter 4

RayCAD|Surface|Editsurf Using Editsurf allows you to change characteristics of a surface using the Surface Edit dialog box.

Selecting Surface Attributes calls up the Edit Attributes dialog box allows editing of all attributes. Each parameter has a name, for example, "Index" "BK-7". You are free to change the "BK-7" but not the name "Index". Also, don't remove the mark separating fields. Caution! It may be safer to use the command relating to the item to be edited. All data can be changed using Index, Size, Thick and Contour. When editing is finished, the surface is redrawn using the new parameters.

150

Commands - Surface Command

Index/Defraction/Splitter takes you through the same prompts as when you generated the surface allowing changes to be made. See page, SURFace|Makesurf . Size and Contour provides you with the Contour Maker dialog box. RayCAD|Surface|Clone Clone allows you to easily make a duplicate of a surface. RayCAD|Surface|Clone|Mirror a surf RayCAD|Surface|Clone|Copy a surf Mirror a surf and Copy a surf are different than regular AutoCAD MIRROR and COPY commands in that the Mirror a surf and Copy a surf make a clone of the

151

Chapter 4

selected surface with it's own Sfnumber. AutoCAD commands like MIRROR, COPY, ARRAY and OFFSETS will not clone a surface but only make a copy. A surface multiplied using these commands will adhere to AutoCAD's standard handling of blocks. If, for example, you made five copies of a surface, then used RayCAD|Surface| Editsurf to change one copy of the five surfaces, all five would be changed. All copies would have the same name and all would be affected by renaming or surface number swapping. To Clone a two surface component, use Clone for each surface, then use Body to make 3-D. Note: Avoid copying optical surfaces using AutoCAD's Copy command if you are intending to optimize using that surface. Instead, use the Clone|Copy or Clone|Mirror command. The optimization receives the name of a surface; and, since AutoCAD's Copy command names a copy of a block the same name as the original, the optimization may optimize the wrong surface. RayCAD|Surface|Redraw Redraw can be useful to update any surface block where a change has been made. It reads all the attributes and then redraws the surface according to the changes. Redraw will update the surface using a current color on a current layer, thus enabling easy color and layer changes. Since surfaces are made into blocks, changing the color and the layer can be difficult. To change the color and/or layer, follow these steps:

152

Commands - Surface Command

From the MODIFY menu use CHANGE PROPERTIES, pick the surface to be changed and, from the dialog box, select the desired layer and color. Change the current color, i.e. COLOR Red. From RayCAD's pull-down select SURFace|Redraw. Pick a surface or enter the surface number. Surface is now redrawn with the new configuration. Use Redraw any time there is a suspected discrepancy between an attribute for a surface and the way the surface looks on the screen. (This will occur if you use AutoCAD's EDIT ATTRIBUTE). RayCAD|Surface|Deactivate Deactivate allows you to select a surface or surfaces to be excluded from the ray trace. RayCAD|Surface|Activate Activate reverses the Deactivate command and enables all surfaces to be part of the trace. RayCAD|Surface|Export RayCAD|Surface|Import The same dialog box is used for both Export and Import. Selecting the RayCAD .SUF format reads and writes text files which can be created and/or edited using a text editor like Notepad. Selecting ZEMAX .ZMX format creates and/or writes a .ZMX file.

153

Chapter 4

Select the format type and direction. ZEMAX Interface The ZEMAX Import Translation grouping is only activated when selected format is ZEMAX and direction is Import. It can add diameters to surfaces and provide a review and edit of the translated surface data. In order for a surface to exist in AutoCAD it must have a diameter. The following two check boxes are controlling an automatic diameter generation. If a surface diameter is 0.0 in the .ZMX file, the following will help in automating the addition of diameters. You can also use the <Review and Edit Translation Data> button to add diameters. When import is finished you may need to use Zoom All in order to view all the surfaces. Sometimes a surface may be far away and very small looking as a point. Use Diameters from Prescription Data: If checked, the program will look for a Prescription Data file created from ZEMAX. The file name is the same as the current .ZMX file, except .TXT is used as the suffix. Use the ZEMAX Reports | Prescription Data menu and save a Prescription file using the same name and directory as current .ZMX Lens Data file. If a diameter is found in the SURFACE DATA SUMMARY section of the Prescription file, it will be used to replace the 0 diameter. If a file of that name is not found, a file dialog box appears. This is optional. Select a Prescription file or press cancel. Pressing cancel has the same effect as clearing to check mark. Since not all surfaces can derive a diameter from the Prescription file, the following command can be useful.

HINTS: It is helpful to leave ZEMAX open in order to reference between RayCAD and ZEMAX.

154

Commands - Surface Command

Inherit Diameters from Prior Surface: A second pass through the surfaces is done in order to provide a diameter to any surface still specifying a zero as the diameter. A new diameter is adopted from the prior surface containing a diameter. Review and Edit Translation Data: This will list all surfaces in a row and column format and allow edit to some of the data.

If some diameters are still missing, a prompt just below the edit field reminds you which surface numbers are missing a diameter (i.e. Dia is needed for 4,6). You can supply a Dia or Height and Width. If you ignore the prompt, at surface creation time you will be prompted again and also given you the option to provide the surface size by pointing. Not all Surface parameters can be modified. For example, to change the world coordinate use the Spacing parameter. If you change the Radius of flat surface from 0

155

Chapter 4

to some value, make sure to change Shape to Sphere. Body Thickness: Single surfaces Imported from ZEMAX do not contain information regarding the body thickness. Use the Import Edit/Review to add thickness to a surface such as a mirror. Positive and negative thickness will determine the side of the surface to which the body is applied. Header Part: Information in the .ZMX file starting from the top down to where SURF 0 starts is remembered from the last Import and surface data from a subsequent Export is appended to it. To load the header portion only without generating any surfaces, perform an Import and select Data preview then OK to return to the main Import/Export dialog box and press Cancel. Export Option: Pressing <Pick Surfaces> allows you to select specific surfaces to be included in the export. Select file Name: Use the Browse button to select a file name. Depending on the Format, the extension default to .ZMX or .SUF. Note: Sequential vs. Non-Sequential In most case you can trace in Sequential mode, and, in the case where one or more surfaces is doubled up in order to be represented in ZEMAX, you must set the trace mode to Sequential. Use RayCAD | Raytrace | Options. In some cases it may be necessary to Deactivate a baffle in order to make possible a sequential trace as in the case of houghton.zmx from the sample section. Use RayCAD | Surface | Deactivate to deactivate a surface.

156

Commands - Surface Command

Surf 0: It is recommended that the first surface, SURF 0, is describing an OBJ type only. SURF 0 is only generated if it has a glass entry. When Exporting, the DISZ dimension is loaded with the distance from inputrays starting point or 0 if InpuRays are parallel. Surface Numbering: Surfaces numbering is important since this will determine the surface sequence in ZEMAX. Use the RayCAD|Surface|Clone|Copy commands to copy surfaces instead of the ACAD Copy command. This assures that a unique Surface number will be assigned. The same is true for the Clone|Mirror command. If you have used the ACAD COPY command to copy optical surfaces and plan to Export to ZEMAX, you may want to use the RayCAD Clone|Copy command (for the reasons described above) and then erase the original. If you place the copied surfaces on top of the original it can be difficult to select the surface below the copy. The following helps - Use Crossing in response to Select Object and select both surfaces. Then type R Enter and L Enter to remove the last from the selection. Press Enter again to complete the ERASE command. A Rectangular obscuration SQOB and Circular obscuration OBSC is modeled as separated surfaces in AutoCAD. A baffle in RayCAD, which is intended to translate to SQOB or OBSC in ZEMAX, must be named in a special way. Append a -B to the surface name (i.e. SURF-3-B). An Export to ZEMAX will combine SURF-3 and SURF-3-B to become a SQOB or OBSC. When importing these surfaces from ZEMAX, the surface name gets the -B appended to it automatically.

157

Chapter 4

In the case of glass to glass, as in a doublet, an extra surface is produced taking on the outline and index information from the first glass and surface shape from the second glass. It has "-a" appended to it's name. Tilted Surfaces: If a surface in RayCAD is flat and tilted in respect to the axis, established by the prior surface, and the next surface direction does not match that of the flat in question, a TILTSURF is reported to ZEMAX. You can control the tilted conversion by placing a screen in the front or behind it, so their directing can control the conversion. Doing so causes a coordbrk to be generated using the appropriate decanters and axis rotations. Since a tilt is determined by surfaces in the front and back of it, a tilted surface can not be the first or the last. Stop Surfaces: A STOP surface having no GLAS is modeled as a Baffle. The hole diameter is DIAM*2 and the outside diameter is made 50% larger than the hole. COORDBRK: When importing, the Coordbrk are eliminated before surfaces are drawn in ACAD. Coordinates Conversion: RayCAD X =Zemax Z , Y =Zemax Y and Z =Zemax X If from the ACAD world view you rotate view 90 deg around the Y axis, you get the same view as if you right click on the ZEMAX 3d layout and enter 90 degrees in the Y rotations axis. Diameter and Curvature: If a diameter is causing the conic formula to fail, the

158

Commands - Surface Command

surface dialog box will appear prompting you for the correct diameter or radius. For example, a surface diameter greater than twice the radius of a Spherical surface will cause this action. The surface dialog box will appear at the time of drawing the surfaces. Shortcoming and Fixes to Come: A cylindrical surface using a round outline will be drawn as a sweep surface and appear spherical. However, the raytracing recognizes the Cylinder shape and will perform accurate traces. Making the Cylinder surfaces outline rectangular will display correctly. A Toroid may be modeled as a Cylinder if the radius or PARM 1 is infinity, otherwise it is modeled as a Sphere or if one of the PARM 2..6 is not zero. The Body command does not work for surfaces containing a Decentering.

159

160

Helpful Hints

Chapter 5
Helpful Hints
ADJUST Q: A: How can I get a better view when using Adjust? Adjust gives you an excellent way to study ray intersections. It allows you to look perpendicularly into a surface and take a thin slice (depth of focus) of the rays passing through this slice. In order to have a good display of intersections, you should have many rays going through this surface. It is suggested you run RayCAD|Raytrace|Random two or three times or the RayCAD|Raytrace|Grid to give you a lot of rays to look at. You may need to set the grid spacing by using RayCAD|Raytrace|Options first. Setting the Height to 15 and the Width to 15 for a total of 225 rays would be adequate. The Random and Grid generator fills up the opening of the first surface with rays and, because of that, generates a 3D ray trace. See Figure 25

161

Chapter 5

Random Ray was run twice, creating 100 rays. Adjust will be done on surface #6

Front view of surface #6 (screen). View is clipped to a default depth of .05

Same view using ZOOM is magnified for better viewing

Figure 25

162

Helpful Hints

CHANGING DRAWINGS Q: Why do I get a strange ray trace when I go from one drawing to another drawing? STARTRAY.DAT files are shared by all drawings, therefore use the INPutray|Gather command when going from one drawing to another.

A:

COLORS FOR DISTINGUISHING RAYS Q: A: Does it matter whether I use color or not? Make use of color selection in INPutray|Gather to distinguish between different output rays. This command allows for color association with the current AutoCAD color, with input rays, with a wavelength label, with the colors of the spectrum or cycle through AutoCAD's color numbering. Note: The appropriate colors can be assigned to the input trays and wavelength labels using AutoCAD's CHANGE PROPERTY and should be done prior to entering the INPutray command. COORDINATES Q: A: Why doesn't the coordinate reading on the top of the display change? Many of RayCAD's commands can be input by typing, pointing or dragging. If pointing or dragging, it is best if the display is responding to the motion of the pointer so that you can see where you are pointing to. Repeated pressing of ^D toggles the coordinate display on, off and angular.

163

Chapter 5

CURVATURE Q: A: How can I make a curved surface negative? A surface's curvature can be made negative or positive depending upon the rotation. There are three ways: A convex curvature is made negative (concave) by rotating the surface 180. This is done using the regular AutoCAD ROTATE command. If using the contour dialog box to specify curvature, use the curve pulldown in the lower left to choose between convex and concave. When making a surface, use the command line to enter a positive radius which places the surface normal in the X direction (0 rotation). A negative radius places the normal in the -X direction (180 rotation)..

1. 2. 3.

Grating - Using a Grating Q: A: What help can you offer on gratings? When using a grating, you may want to find wavelength/order overlaps. See below:

If an input ray has a wavelength of 253.6 nm and is then traced through an echelle grating of 79 grooves/mm with a blaze angle of 63.43, RayCAD will calculate and prompt with the appropriate order for you to use, in this case, the 89th order. From a known wavelength or order, one can easily estimate where overlaps will

164

Helpful Hints

occur. Use one of the formulas below: 1. First, let's find the order for wavelength 555.0 nm. To estimate an unknown order for wavelength 555.0 nm take the product of the known wavelength and known order, then divide by the desired wavelength. 253.6 nm x 89 / 555.0 = 40.667 order Fractional orders must be rounded to nearest whole number. 2. To estimate an unknown wavelength for a given order, take the product of the known wavelength and known order, then divide by the desired order. 253.6 nm x 89 / 41 = 512.42 wavelength INPUT RAYS - Keeping Input Rays Q: A: Can I use input rays again? Since all input rays are kept in a file named STARTRAY.DAT, you may wish to save a particular collection of input rays for later use. Using the File Manager or SHELL COPY command, copy STARTRAY.DAT to MYSTART.DAT. Later on you can rename MYSTART.DAT back to STARTRAY.DAT. COMPARING MULTIPLE OPTICAL SYSTEMS Q: It would be useful to compare two similar optical systems. Can this be done? Use the COPY command and make 2 or more sets of your input rays. Also generate additional surfaces for the extra systems. Lay them out in such a way that rays do not cross into each other or place mirrors between them. Then, when gathering rays, gather all sets at one time (you can also gather just one set of rays at a time). This will trace all the systems when traced

A:

165

Chapter 5

in non-sequential mode. It is OK to have multiple light sources. PRISMS - Adding a Roof to a Prism Q: A: How can I add a roof to a prism? Use either the Plates or the Prism to generate a refractive surface. When requested for second surface, just answer No. Give it a size to cover the roof. You can use the pointer in the size command. For example, to connect 2 corners of the roof, respond to the prompt for size by typing INT for intersection and point to an upper corner. For the prompt of Next Point, type INT and point to the second corner. The key here is that, as long as the index material is the same, you can combine any number of refractive surfaces.

RAY TRACE Q: A: Why do rays pass through the outside of my aperture? Use Sequential trace mode. If ray does not make it through, it is stopped. In Non-sequential mode, the ray will not make an intersection but will look for a surface beyond. How can I see the intersection point of a trace? Just select a trace by pointing and all insertion points are indicated by a small square (later versions of AutoCAD only). Traces are polylines. Therefore, the PEDIT EDIT VERTEX will display a cross on each intersection as you press Next or Previous.

Q: A:

SAVING A DRAWING - Shared Viewing of an RayCAD Drawing Q: A: How can someone look at my drawing if they don't have RayCAD? You need to save your drawing with a menu other than RAY.MNU. Before saving your drawing, type on the command line MENU

166

Helpful Hints

ACAD.MNU. The AutoCAD menu will load. Then save the drawing. A drawing saved in this manner can be viewed by anyone. Note: You will need to load RAY.MNU to use this drawing with RayCAD again. SURFACE - Inserting Surfaces Q: A: How do I get back to my original set up to insert more surfaces? It always pays off to organize your work before getting started by selecting the VIEW and UCS where you will do surface insertions. If you save the VIEW and UCS by name (or stay with a World View), you can easily restore the original view. Thus, when adding surfaces, these new surfaces will be oriented in the same way. Another way is to use RayCAD's Display|Viewports or Display| Surflook Top (world) Front Left Right for a consistent way of looking at your design. Or, you could use an existing surface to set the coordinates: Type UCS ENTRY (point to surface) <Enter> Type UCS Y -90 <Enter> Type UCS X -90 <Enter> The coordinates are aligned so that the next insertion will line up with an existing surface.

167

Chapter 5

SURFACE - Last Surface Q: A: How many surfaces do I need to see a ray trace? Remember to always have at least two surfaces when doing a ray trace. The last surface is not traced through, the rays are just projected onto the last surface. It is common to use a Screen as the last surface.

SURFACE NORMAL - Using the Surface Normal Q: A: What is a "Normal"? Each surface has a normal which is a small line extending from the center of the surface (also the block insertion point). This line represents the surface normal and can be used as a reference when rotating the surface.

U for Undo Q: A: Does Undo work with RayCAD? AutoCAD command Undo works on all of RayCAD commands. Go ahead and do a focus and don't worry about the results - just use Undo to return to the original layout. You may need to use Undo more than once. Repeat Undo until you see "mark encountered".

168

Appendix

Appendix

A - Files for Data Transfer B - Configuring AutoCAD for RayCAD menu C - Troubleshooting

169

Appendix

APPENDIX A
Files for Data Transfer Four files are used in data transfer between RAYW.EXE and RAYCAD.LSP. 1. STARTRAY.DAT This data file contains records of input rays and is generated by RAYCAD.LSP. Each record contains the ray's starting point, it's direction, wavelength associated and the color of the trace. A blank file is supplied. 2. SURF.DAT This data file contains records of surfaces and is generated by RAYCAD.LSP. Each record contains a name, location, orientation, rotation, curvature, component type (reflective, refractive, diffractive or aperture), index name and more. Note: The number of surfaces and input rays are related in that they share the available memory (i.e., you may have 356 surfaces and only two input rays or you may have 700 input rays and only three surfaces, or any combination of the two). 3. RAY.DAT A file that will be created by RAYW.EXE containing the calculated surface intersection points to be read and drawn by RAYCAD.LSP. 4. OBJECT.DAT This contains coordinates for wire meshes if the optional Optical Object is installed.

170

Appendix

APPENDIX B
Configuring AutoCAD for RayCAD Menu RayCAD supplies a menu file called ray.mnu. Upon initialization of RayCAD, the ray.mnu file is attached to the current menu. This way any customization you have is retained. RayCAD also supplies a toolbar consisting of several fan-out toolbuttons enabling most of RayCAD's functions. If the toolbar shows "happy faces", it is probably due to one of two reasons: If large buttons for your toolbar has been selected (which we do not support at this point), please go View | Toolbars and clear the Large Buttons check mark. AutoCAD may have lost track of toolbutton location. The best way to reestablish that connection is to provide AutoCAD with RayCAD's directory path. Select Tools | Options and click Files tab. Select "Support File Search Path" and click the Add button then the Browse button and locate the RayCAD6\source directory and click OK.

171

Appendix

APPENDIX C
Troubleshooting There are situations where a ray trace is not possible such as when positioning and angles of components cause optical calculations to be violated (especially when gratings are involved). Try using OPTimize to position and rotate your component to such a point where you get a complete trace. There are also situations where optimization is not possible. See Optimize, page on page 75 for more information. If that does not solve the problem, check the following for a possible cause: Free Spectrum: The order for a given wavelength is calculated and prompted for each ray. Gratings can only work in a narrow range of orders per wavelength before violating the grating equation. Gratings/Echelles: Gratings must be rotated according to their blaze angle. Groove facet must face the direction of the incoming ray. Example: If the ray's direction is going from left to right (positive x direction), and an echelle grating blazed at 63.4349 (= atan 2) is inserted, you will have to rotate the surface approximately -63. This will insure the ruled facet to be facing the incoming ray. In this -63 counterclockwise rotation configuration, the face of the grating will be up (the surface normal points in a positive Y direction). If your design requires the grating surface to face down instead of up: You CANNOT just rotate positive 63 because light would be striking the wrong side of the grooves. You will have to spin the grating 180 around it's normal. To accomplish this, set UCS to E ROTATE INS (point to surface) 180.

172

Appendix

Internal Reflection: TIR is a physical phenomenon which occurs when light tries to pass from a dense medium to a less dense medium at too shallow an angle. This angle is called the critical angle and occurs around 42. Ray trace will be completed as if it had encountered a mirror. Input ray Elevation: If input rays do not intersect the first optical surface, check elevation of input rays (Z dimension). Use the RayCAD|Display|Viewports to make inspection easier. Input ray has Moved: If a input ray has moved, it must be reread by using INPutray|Gather. Surface/Block Missing: If a surface has been made part of another block, RayCAD will not find that surface. Surface Labels: If erroneous labels are displayed on each surface, there could be a text font problem. See "Unknown Command" below. Use ERASE to remove incorrect text labels afterward. Trace Stops Prematurely: Sequential surface numbering is important if tracing in sequential mode. Use RayCAD|Trace|Option and set the trace mode to non-sequential. Also, a ray will stop when there are no more surfaces that can be reached. Use Screens to catch any stray rays. "Unknown Command": This error is generated when AutoCAD does not recognize a command sent to it. Press U for Undo to restore AutoCAD to before the command causing this error. One of the causes can be when RayCAD requests a label height and the

173

Appendix

current loaded text style has been loaded with a height other than zero. To fix this, use AutoCAD's pull-down menu under DRAW, press TEXT and select SET STYLE. Choose the font you want and, when prompted for height enter zero, for width enter 1.00. Warning Message !!! No index coefficient named <filename> was found !!!:

Use Editsurf dialog box and review the index name making sure that a file with that path and file name is on your disk.

174

Glossary

Glossary
APERTURE: An opening through which light may pass. It can be used as a field stop. ASPHERIC: An optical surface that is not spherical. The surface deviates from spherical, usually to reduce spherical aberration. Often generated by surface of revolution about the surface normal. ASPHERIC CONSTANT: A1, A2, A3 and A4 are the aspheric deformation constants. BAFFLE: An opaque shielding device designed to reduce the effect of stray light on an optical system. BEAMSPLITTER: A device used to divide a beam into two or more separate beams. BLAZE: A plane that forms one side of the groove ruled on a diffraction grating. In this way, spectral energy may be concentrated into one angular region. CLADDING: The low-refractive-index material that surrounds the core of an optical fiber. CLIP: The viewing of just a slice of the screen (same as CLIP under AutoCAD's DVIEW command). COLLIMATE: Radiation in which every ray from any given object point can be considered to be parallel to every other. This is hardly ever completely the case: The light from a star is really diverging, and all collimators have aberrations. CONCAVE: A term describing a hollow curved surface; curved inward. CONIC CONSTANT: K is a function of the eccentricity of a conic surface

175

Glossary

(K=-e2). CONVEX: A term describing a spherical shaped surface; curved outward. CURVATURE: A measurement of departure from a flat surface; reciprocal of radius (1/radius). the

CYLINDRICAL SURFACE: A surface formed by all the straight lines that are parallel to a given line and that pass through a given curve which is not in the same plane as the reference line. DIFFRACTION: As a wavefront of light passes by an opaque edge or through an opening, secondary weaker wavefronts are generated apparently originating at that edge. These secondary wavefronts will interfere with the primary wavefront as well as with each other to form various diffraction patterns. ECHELLE: A grating that features useful efficiencies covering UV-IR in a single grating, together with exceptionally high dispersion resulting in superior resolution. An echelle grating often operates over hundreds of orders. FIBER: A thin filament of drawn or extruded glass or plastic having a central core and a cladding of lower index material to promote internal reflection. FIELD STOP: An aperture located at an image plane of an optical system that determines the size and shape of the image. FRESNEL: A lens resembling a plano-convex or plano-concave lens that is cut into narrow rings and flattened out. GRATING: A grating consists of a glass substrate with a series of parallel, equispaced lines with interstices between them on the front surface of the glass. It is used to disperse light by interference between wave trains from the interstices. HOLLOW WAVEGUIDE: An infrared-transmitting optical fiber with a

176

Glossary

hollow core. Capable of carrying high laser power but subject to high bending losses. INDEX OF REFRACTION: The ratio of the velocity of light in air to the velocity of light in a refractive material for a given wavelength. LENS: A refractive optical component consisting of two surfaces where the surface is curved in such a way as to converge or diverge the transmitted rays from an object. MEDIUM: Any substance or space through which electromagnetic radiation can travel. MIRROR: A smooth, highly polished surface, for reflecting light, that may be plane or curved. The actual reflecting surface is usually a thin coating of silver or aluminum on glass. NANOMETER: A unit of length in the metric system equal to 10-9 meter. NORMAL: A normal is illustrated by a small line through the center point on your surface. This point is also the insertion point of the surface. The line is perpendicular to the tangent line at that point. ORDERS: A particular wavelength will make a constructive interference at a point in space where the difference in path length that a wavefront must travel due to spacing between successive grating grooves that cause the interference is a multiple of the wavelength. This multiple is called the Order. For example, a wavefront of a wavelength of 546 nm will appear in the 1st Order if a total travel difference between grating grooves is 546 nm. Constructive interference will appear in the 2nd Order when travel difference is 546 times 2 = 1092 nm. Consequently, a coarse grating produces many orders while a fine grating may produce only one or two.

177

Glossary

PRISM: A transparent optical element having at least two faces inclined relative to each other, from which light is reflected or through which light is refracted. RAY: A geometric representation of a light path through an optical device; a line normal to the wave front indicating the direction of radiant energy flow. REFLECTOR: A type of conducting surface or material used to reflect radiant energy. A curved reflective component that can have a hole in the center. REFLECTION: wavelength. Return of radiation by a surface, without change in

REFRACTION: The bending of oblique incident rays as they pass from a medium having one refractive index into a medium with a different refractive index. SCREEN: viewing. A surface, usually flat, onto which an image is projected for

SPHERICAL: Shaped like a sphere; rounded; globular. SPOT DIAGRAM: A method of evaluating image quality whereby a large number of rays are traced through an optical system from a single object point, and their intersections with the focal plane are plotted and analyzed. SURFACE: One of the faces of an optical element.

TRANSMISSION GRATING: A transparent diffraction grating that serves to transmit light. TUBE: A single surface used with other refractive surfaces to model holes or rods.

178

Index
Activate, 153 Adjust, 161 Aperture, 117, 175 Aspheric, 175 Aspheric Constant, 175 Aspherics, 136 Baffle, 117, 175 Beamsplitter, 120, 175 Beamsplitters, 131 Blaze, 175 Body command, 51 Catalog lenses, 145 Changing drawings, 163 Cladding, 175 Clip, 175 Clone, 151 Collimate, 175 Commands, 49 Body, 51 Display, 54 Inputray, 60 Object to Optical, 67 Optimize, 75 Raytrace, 99 Remove, 110 Surface, 112 Component thickness, 141 Concave, 175 Cone, 140 Conic Constant, 175 Conic surfaces, 137 Contour, 134 Convex, 176 Coordinate system, 113 Coordinates, 163 Curvature, 164, 176 Cylinder, 140 Cylindrical Surface, 176 Deactivate, 153 Defining second surface, 142 Diffraction, 176 Diffractive surfaces, 131 Display command, 54 Dataprint, 56 Render-Ready, 58 Restore screen, 58 Surflook, 55 Viewports, 57 Echelle, 131, 176 Editsurf, 150 Ellipsoid, 140 Export, 153 Fiber, 120, 176 Field Stop, 176 Files for Data Transfer, 170 Fresnel, 120, 131, 176 Getting Started Quick Start, 14 Tutorial, 19 Good advice, 115 Grating, 131, 164, 176 Helpful Hints, 161 Hollow Waveguide, 133, 176 Hyperboloid, 140 Import, 153 Index Data, 124

179

Index of Refraction, 177 Input Rays, 165 Inputray command Drawray, 62 Gather, 64 Listray, 66 Inputray Command, 60 Installation, 9 First Time Installation, 9 Index File Locations, 12 Initialization, 10 Menu Conflict, 11 Troubleshooting, 12 Upgrade Initialization, 11 Upgrade Installation, 9 Isolating the r and K values, 138 Lens, 120, 177 List surface, 149 Medium, 177 Menu file, 171 Mirror, 133, 177 Nanometer, 177 Normal, 177 Object to Optical command, 67 3D objects, 72 Assign optical properties, 68 Sample drawing, 73 Optimize command, 75 Adjust, 88 Collimate group, 82 Curvature optimizing, 85 Focus group, 79 Mode, 97 Rotate, 94 Orders, 177 Paraboloid, 140

Pass-through surfaces, 117 Plates, 120 Prism, 120, 166, 178 Ray, 178 Ray trace color, 163 Ray tracing, 166 Raytrace command, 99 Grid, 102 Option, 103 Random, 102 Spot, 104 Trace, 100 Redraw, 152 Reflection, 178 Reflective surfaces, 133 Reflector, 133, 178 Refraction, 178 Refractive surfaces, 117, 120, 131 Remove command, 110 Erase, 111 Renumber, 111 Rotation, 143 Screen, 117, 178 Spherical, 178 Spot Diagram, 178 Surface, 178 Surface cloning, 151 Surface command, 112 Activate, 153 Catalog, 145 Clone, 151 Deactivate, 153 Editsurf, 150 Export, 153 Import, 153 Listsurf, 149

180

Makesurf, 116 Redraw, 152 Sfnumber, 146 Surface editing, 150 Surface name, 141 Surface number, 146

Thickness, 141 Transmission Grating, 131, 178 Troubleshooting, 172 Tube, 120, 178 Tutorial, 19 ZEMAX Interface, 154

181

You might also like