SNELL TRACE MANUAL (Snell.exe) INTRODUCTION "Snell Trace" will trace meridional rays of light through a user-defined system of spherical refracting surfaces, using Snell's law of refraction with no approximations. Both scale drawings and numerical data are generated and displayed. Three steps are involved in using Snell Trace: I. Specifying the user's optical system, using the "CONFIGURATION" screen. II. Specifying the particular light ray(s) to be traced, using the "TRACE ONE TO TWENTY FIVE RAYS" screen. III. Displaying the results, using the "RAY PLOT" and the "NUMERICAL DATA" screens. The user may jump among these four screens in any order to change inputs and view results. The program is exited only by clicking "QUIT" in the top menu bar of any screen. The usual Windows exit controls in the upper right and left corners are disabled in these screens. CONVENTIONS I. Light travels from left to right. The graphical output (the "RAY PLOT" screen) traces each ray from its (user-specified) beginning in the "INPUT" (or "SOURCE") plane (the left edge of your monitor screen) to its (calculated) destination in the "OUTPUT" plane (the right edge of your monitor screen). II. The "RAY HEIGHT" of a point on a light ray is its vertical distance from the (horizontal) optical axis, positive numbers for points above the axis, negative numbers for points below the axis. III. The "RAY ANGLE" of a light ray is the acute angle which the ray makes with the (horizontal) optical axis, a positive number if the ray is traveling upward (and to the right), a negative number if the ray is traveling downward (and to the right). IV. The "RADIUS" of a spherical refracting surface is a positive number if the center of curvature is to the right of the surface, a negative number if it is to the left of the surface. The "RADIUS" of a plane interface can be represented by any "large" number (eg., 1E10), to specify an effectively infinite "RADIUS". V. The horizontal scale of the "RAY PLOT" screen is fixed so that the (user- determined) physical distance from the "INPUT" (or "SOURCE") plane to the "OUTPUT" plane is represented by the monitor screen width, which is divided into 40 horizontal "grid" divisions. By default, vertical distances are drawn to the same scale; but this choice can be over-ridden by the user, by specifying a non-unity "VERTICAL MAGNIFICATION" in the "TRACE ONE TO TWENTY FIVE RAYS" screen. VI. Distances and lengths can be entered in any convenient unit (ft, cm, etc.); but all distances and lengths must be entered in the SAME unit. THE "CONFIGURATION" SCREEN A.) The user specifies the optical system by filling in the 4 columns labeled (left to right): "INDEX", "LENGTH", "RADIUS", and "APERTURE". Each row of 4 entries specifies the properties of a segment of the optical system: B.) "INDEX" specifies the index of refraction of the segment (when the index value changes, you have entered a new segment). C.) "LENGTH" is the (positive) horizontal length of the segment, measured along the optical axis. D.) "RADIUS" is the radius of curvature of the spherical interface which terminates this segment; it carries a sign, as defined above under "CONVENTIONS". E.) "APERTURE" is the height - top to bottom - of the spherical interface; it must be a positive number between zero and twice the "RADIUS". F.) The topmost row of "CONFIGURATION" entries specifies the leftmost segment of the optical system - beginning at the "INPUT" (or "SOURCE") plane and terminating at the first spherical interface encountered by the light rays. The succeeding rows of entries (top to bottom) specify succeeding segments of the optical system (left to right). G.) The final segment of the optical system is represented by only two entries: the "INDEX" and "LENGTH" of the segment ending in the "OUTPUT" plane. The remaining (rightmost) cells of this row of entry cells ("RADIUS" and "APERTURE") must be left blank. These blank cells define the end of the optical system; all cell entries beyond these blank cells are ignored. H.) This "CONFIGURATION" data may be saved in a disk file for later recall into the program. Any file name and extension may be used (the example data files use the format *.txt). I.) When the "CONFIGURATION" screen is complete, click on "ADD RAYS" to bring up: THE "TRACE ONE TO TWENTY FIVE RAYS" SCREEN A.) Each ray begins in the "INPUT" (or "SOURCE") plane. The user specifies the vertical coordinate ("RAY HEIGHT AT SOURCE") and the elevation ("RAY ANGLE AT SOURCE") for the beginning of each ray in this "SOURCE PLANE". Each of these entries carries a sign, as defined above in "CONVENTIONS". Either degrees or radians may be chosen for angle specifications (one choice for all entries). B.) From 1 to 5 "RAY HEIGHTS" and from 1 to 5 "RAY ANGLES" may be specified. For each specified "RAY HEIGHT" value, a ray is drawn for each specified "RAY ANGLE" value. Thus from 1 to 25 rays may be specified with each use of this screen. C.) If a blank cell is left in either the "RAY HEIGHT" row or the "RAY ANGLE" row, all further cells (to the right) IN THAT ROW are ignored. D.) The graphical output may be stretched or compressed in the vertical direction by entering a "VERTICAL MAGNIFICATION" other than 1. The "properly scaled" values of all vertical coordinates (of surfaces and rays) will then be drawn multiplied by the entered "VERTICAL MAGNIFICATION" value (with sign). This will not change the numerical data values saved in memory for printout or for saving to disk files. E.) When done, click "OK" to initiate the tracing calculations and bring up: THE "RAY PLOT" SCREEN A.) After a short computation time (depending on your computer's speed) this screen shows a plot of the specified rays traced through the specified optical system as predicted by Snell's Law, with no approximations. B.) Click on "HIDE CONTROLS" to remove the 4 clickable control buttons. Then click anywhere on the screen to bring them back. C.) Click on "PRINT PLOT" (top menu bar) to print this screen (the controls will not be shown), using your Windows default printer settings. You probably will want to set your default printer preference to Landscape, rather than Portrait. D.) Click on "VIEW NUMERICAL DATA" to view the numerical output. This is a sizable and scrollable (when needed) screen. You may edit this screen with selection and annotation capabilities, for printing or copying to the Clipboard. Standard Windows Clipboard functions are available by clicking on the drop -down EDIT menu in the top menu bar. This screen is printed through the drop -down PRINT menu in the top menu bar; this menu also gives you a choice of fonts. E.) Click on "SAVE DATA TO A DISK FILE" to save the numerical data to disk (use any file name and extension of your choice). The data is saved in the same format viewed in (D.), just above, and can be read as simple text. F.) Click on "ADD RAYS" to return to the "TRACE ONE TO TWENTY FIVE RAYS" screen and specify additional rays to be traced. CAUTION: If you need the numerical data of the already traced rays, you must save it (to disk or to the clipboard and then an editor) before adding more rays. Snell Trace's numerical data buffer is cleared whenever one clicks "OK" on the "TRACE ONE TO TWENTY FIVE RAYS" screen. G.) You may erase this screen plot at any time by clicking "ERASE PLOT" in the top menu bar. This does not erase the numerical data buffer, which is erased only when "OK" is clicked in the "TRACE ONE TO TWENTY FIVE RAYS" screen, initiating another calculation and plot. THE "NUMERICAL DATA" SCREEN The numerical data is formatted as follows: A.) All the data specifying the path of each single ray through the entire system is grouped together into a single "paragraph" and is separated from the data specifying other rays by a blank line. B.) Within each "paragraph", each line specifies the ray's path through a single segment of the optical system. Succeeding lines of data (top to bottom) refer to succeeding optical system segments (left to right). B.) The first 3 entries in each line represent three of the "CONFIGURATION" data entries ("INDEX", "LENGTH" and "RADIUS") specifying a segment of the optical system. This is followed by an "arrow" symbol (-->). C.) The last two entries in each line specify the intercept and elevation angle of a ray traversing the specified segment. The first entry (the intercept) is the horizontal distance from the beginning (left end) of the segment to the point where this ray (or its extrapolation) crosses the optical axis. This distance will be negative if the intercept point is to the left of the segment beginning (left -end). If the ray is horizontal, there is no intercept and this entry specifies instead the vertical coordinate (height) of the horizontal ray in the form "H= ". The last entry is the angular elevation of the ray above the horizontal, using the same sign convention specified for "RAY ANGLES" defined in "CONVENTIONS". D.) This numerical data is sufficient for reconstructing, "by hand", the specified optical system (except for the "APERTURE" sizes) and the traced rays.