Contents
Raytrace Evaluation Version

This copy of Raytrace is supplied freely for the purposes of evaluation only. Should you decide that you want to use the program for teaching, demonstration or other purposes you should purchase a licensed copy. For pricing and ordering information contact:

IME Software

P.O. Box 1153,

Toowong QLD 4066,

AUSTRALIA

Phone/Fax: +61 7 870 2317

Please make this evaluation copy available to others whom you think might be interested in using Raytrace.

Some functions have been disabled in the evaluation copy of Raytrace. These include the ability of save ray diagrams that you create, the undo facility, the print function and the edit functions cut, copy and paste.

Licensed copies of Raytrace come with a comprehensive User's Manual with over 100 pages of step by step illustrated examples.

You can purchase a single user licence or a site licence depending upon your needs. A site licence allows the program to be used on any number of computers within the one organisational area.

Raytrace comes with a 30 day money-back guarantee. This entitles you to examine the documentation for a period of 30 days from the date of receipt and to return the package with the sealed disk intact for a refund.

To learn some of the basics about Raytrace choose on of the following topics:

Introduction

Getting started

What's new and not in the User's Manual...

List of examples

How do I ... ?

Menus

List of supplied .RAY files


What's new
New features not in the User's Manual

The following features have been added since the last edition of theUser's Manual was printed:

Script facility

Unlinking sources

Undo up to 5 operations

Rotate by dragging

Select extended

Quiet snapping

Snaps on Tape Measures

Default fertility of projected rays

Colour of "Par-axial" element apertures


Introduction
Introduction to RAYTRACE

Thank you for purchasing Raytrace.

Raytrace calculates the paths followed by light rays passing through two dimensional optical systems of arbitrary complexity. It is intended primarily as a teaching tool but can also be used for practical design of optical systems. All ray paths are calculated using double precision arithmetic and the basic principles of reflection and refraction - no approximations are made. In addition to "real" optical systems, Raytrace can calculate and display the standard thin lens and par-axial spherical mirror approximations that are found in the text books.

Raytrace is sold either as a single user licence or as a site licence. The type of licence is indicated in the opening dialog box. A single user licence means you agree to install and use the program on a single computer at a time. A site licence entitles Raytrace to be used on any number of computers simultaneously within the one organisational area. My philosophy is to make high-quality, useful software available at an affordable price. This can only happen if those who use also pay. Please respect this principle; if you are using a copy within one organisation, move on to another organisation which does not have a copy and want continue using Raytrace or want to use Raytrace at home for your own purposes then please either convince the new organisation to purchase a licensed copy or purchase your own personal copy.

I hope you find Raytrace useful and easy to use. If you have a suggestion for improving Raytrace or a particular application which Raytrace does not quite fulfill then please let me know. I will make every effort to incorporate such suggestions where possible.

I have tested Raytrace extensively but if you do find a bug then please make a note of what the problem is; the exact circumstances under which the problem occurred (including type of computer, hardware and software configuration); the version number and release date of the copy of Raytrace (as displayed in the opening dialog box or by using the File -- About menu item) and send it, preferably with a copy of any relevant Raytrace files to me.

Once again, thanks for your support,

Ian Moore.

PS: I suggest you click here: Getting Started to pick up some essential information.


Getting started

This section is intended to get you going as quickly as possible. How you approach Raytrace will depend upon you computer experience. If you are reasonably experienced with Window's applications then you might like to read Using the mouse which will probably be enough so that you can work the rest out yourself.

Another way to get started is to load some of the sample ray diagrams  (using File -- Open) that are shipped with Raytrace and play with them to get a feel for the operation. You can use these as a basis for your own diagrams.

If you have little experience or are not very confident then you can work through a sequence of examples which cover some of the basic Raytrace operations in a step by step manner.

If you are unfamiliar with the use of the Windows Help facility then click here for some brief notes on using help before proceeding.

The examples assume that you are using Raytrace as it starts with its normal default settings. If you have changed any default settings or suspect that you might have then it would be best to quit Raytrace and restart it.

Some of the examples build on previous examples so its probably a good idea to work through them in sequence.

You will probably find this easier to use if you maximise the Raytace window, select the Always on Top option from the Help's Help  menu and resize the Help window so it only covers a small part of the Raytrace window. Alternatively, print out the help topic by selecting Print topic from Help's File menu.

Because you will need/want to switch between Help and Raytrace to follow the examples you should read the note on Switching applications.

List of examples


List of examples
List of guided examples

In all of these examples, a sequence of commentary notes is interspersed with explicit directions about the actions you should perform. These directions are indented from the commentary text and appear in this colour. For example:

This is a comment describing the some feature of the example.

*  This is an action you should perform.

You should probably work through these examples in the order presented since some of the terminology used in later examples is defined in the earlier examples. You can do this by using the browse buttons >> and <<  to go foward and back in the sequence or you can simply select the example from the list below:

Refraction in a simple triangular prism

Image formation by a thin converging lens

Using tape measures and protractors


Refraction in a simple triangular prism
Guided example: Refraction in a simple triangular prism

Begin by ensuring that the Raytrace work area is completely clear.

*  Select All from the Clear menu.

Next, create the prism refracting element.

*  Select Element from the Create menu.

Move the cursor into the Raytrace window.

The cursor will appear as a small arrow with the word Start in a box. This is refered to as the "start point" cursor and it shows that you should select the starting point for drawing the element.

*  Move the cursor to a point about half way across and a third of the way down the ray trace window.

*  Click once on the primary mouse button

You can now drag the mouse about to define the first side or segment of the element. A "rubberband" will stretch out between the starting point selected above and the cursor.

You do not have to hold the primary mouse button down while dragging in Raytrace; this is one important difference between Raytrace and other programs like some drawing packages.

The cursor will have changed to the "end cursor" - a small arrow and the word "End". This is a prompt that you should select the end point of this segment.

*  Drag the cursor down and left to a point about one quarter of the way across and a two thirds of the way down the Raytrace window.

*  Click once on the primary mouse button to select this as the end point of this segment.

Draw the second side of the prism in the same manner.

*  Drag the cursor across to the right to define the bottom of the prism.

With two sides of the prism defined, the third will be created automatically in the next step.

*  Click once on the secondary mouse button.

A popup menu will appear and the cursor will revert to the standard pointer that you normally have in windows.

*  Select the item Region from this popup.

Raytrace will close the triangle and fill it with the current fill colour. Next, create a ray and trace it through the prism.

*  Select Ray from the Create menu

Note that the cursor again indicates that you are selecting a starting point.

*  Move the cursor to the point where you want the ray to start - in this example about one quarter of the way across and half way down the window should be OK.

*  Click once on the primary mouse button.

You can now drag the ray out in the direction that you want. Towards the middle of the left-hand side of the triangular prism would be a good direction to take at this stage. It does not matter if you drag the ray over the prism or not; Raytrace will adjust the ray as necessary when it calculates the resulting ray paths.

*  Move the cursor to the point where you want the ray to end and click once on the primary mouse button.

The cursor will change back to the "start point" form and you can continue drawing more rays in the same manner if you wish. For this example we will stop with one ray.

*  Click once on the secondary mouse button and select Finished  from the popup menu that appears.

This tells Raytrace that you have drawn all the rays that you want for the moment and it will now calculate and draw the resulting ray paths through the prism. What this looks like depends on the exact geometry of what you have drawn. You might see the ray pass right through the prism and out the right hand side or it might be totally internally reflected before exiting the prism.

Next, drag the ray about and see what happens. At this point the cursor will consist of a small box with the word "Select". The box is refered to as the "select box". Whenever this cursor is visible you can select objects like rays and elements so that you can operate on them.

*  Position the cursor so that part of the ray that you have drawn passes through the small box in the cursor.

*  Click once on the primary mouse button.

The ray will now be selected. This is indicated by the drag handles that are drawn at either end of the ray.

*  Position the cursor so that the select box is over the drag handle on the starting end of the ray that you drew.

*  Click once on the primary mouse button.

It is not necessary to position the cursor exactly over the drag handle. A 50% overlap should work. Now the cursor will have changed to the "drag cursor", a small arrow and the word "Drag". This indicates that you are dragging some part of the ray diagram.

*  Move the mouse about and see what happens.

*  When you have finished dragging click once on the primary mouse button.

You can also drag the whole ray about. The ray should still be selected at this stage.

*  Position the cursor so that the ray passes through the select box somewhere away from the drag handles at the ends of the ray.

*  Click once on the primary mouse button.

The cursor will change to the "drag cursor" and you can now drag the ray about while maintaining its direction.

*  Move the mouse about and see what happens.

*  When you have finished dragging click once on the primary mouse button.

You can also change the shape of the prism.

*  Select the prism by positioning the select cursor so that part of the prism outline passes through the select box and clicking once.

*  Select a vertex to be dragged by positioning the select box over one of the drag handles and clicking once.

*  Drag the vertex to a new position and click once.

You can also drag the whole prism. Make sure the prism is still selected.

*  Position the select box over any part of the prism outline which is not a drag handle and click once.

*  Drag the prism to a new position and click once.

You can also drag a segment. Make sure the prism is still selected.

*  Select a segment to be dragged by positioning the select box over the segment, hold down the control key and click once.

*  Drag the segment to a new position and click once.

Change the refractive index of the prism.

*  Select the prism.

*  Select Element > Refractive Index from the Modify menu.

A dialog box will appear with three scroll bars and a few other controls. These allow you to set the refractive index for the three different colours of rays. You can enter a refractive index directly into the edit box next to the scroll bars or use the scroll bars directly. The other controls are described in more detail in Modify -- Element > Refractive Index.... You can move the dialog box around if it obscures part of the diagram that you want to see.

*  Click on Ok to accept the change or Cancel to revert to the original refractive indices.

Next example


Image formation by a thin converging lens
Guided example: Image formation by a thin converging lens

Begin by ensuring that the Raytrace work area is completely clear.

*  Select All from the Clear menu.

Now creating a thin lens element.

*  Select Element from the Create menu.

*  Move the cursor to the position where you want one end of the lens aperture to be (about half way across and a third of the way down the window would be a good point to choose) and click the primary mouse button once.

The cursor will change to the "end point" form. Specify that you want a converging thin lens.

*  Click once on the secondary mouse button.

*  Select Thin Lens F+ from the popup menu.

*  Move the cursor to where you want the other end of the lens aperture to be (about two thirds of the way down the window directly below the starting point would be good).

*  Click once on the primary mouse button.

The lens aperture is not drawn at this stage. The cursor will change to the "focus point" form - an arrow with the word Focus in a box - and a rubberband will stretch from the middle of the defined aperture to the cursor. The length of this rubberband defines the focal length of the lens; the direction in which you drag the rubberband is irrelevant.

*  Drag the cursor until you obtain a suitable focal length and click once on the primary mouse button.

The lens will appear. The aperture is indicated by a simple line with arrow tips at either end to indicate a converging lens. The principle axis between the focal points is indicated by a dashed line.

Now create a shape element that will be the object.

*  Select Element from the Create menu.

*  Move the cursor to the position where you want one end of object (to the left of the lens so that the rest of this example makes sense) and click the primary mouse button once.

*  Click on the secondary mouse button and select Shape only from the popup menu.

*  Drag the cursor to where you want the other end of the object to be (a short distance below the first point would be good) and click on the primary mouse button.

*  Click on the secondary mouse button and select Finished from the popup menu.

You could have defined a more complex object but a single line will do for this example.

Now create a point source attached to one end of the object you have just drawn.

*  Select Source >> Point from the Create menu.

A dialog box will appear asking for the number of rays to be generated from this source.

*  Change the current number of rays to 3 (you can use more if you like) and click on OK.

The cursor changes to the "Centre point" form.

Attach the point source base point to one end of the object shape by using a snap.

*  Click once on the secondary mouse button and select End Snap  from the popup.

The cursor changes to the "End select" form.

*  Position the cursor box over one end of the object shape and click the primary mouse button.

If you do not position the cursor over an end point when you click the primary mouse button then the system exclamation sound will be played and the cursor will stay in the "End select" form. If you do position the cursor correctly then the system default beep will sound and the cursor will change to the aperture 1 form. If your computer does not have a sound card then both these sounds will probably be the same and you must rely on the change in the cursor appearance.

Once you have selected the base point with the end snap and the aperture 1 cursor is displayed you need to define the aperture through which the rays coming from this source will pass. The rays will be drawn in an anti-clockwise direction starting near the first point you select and stopping near the second point you select. The rays are spaced with equal angles between them and half that angle between either extreme ray and the aperture end points chosen. Because the object was drawn to the left of the lens in this example the first aperture point should be chosen as the bottom of the lens and the second as the top.

*  Click once on the secondary mouse button and select End Snap  from the popup.

The cursor changes to the end select form.

*  Position the cursor box over the lower end of the lens aperture and click the primary mouse button.

The cursor changes to the aperture 2 form for the second point. Use an end snap again to select the upper end of the lens.

*  Click once on the secondary mouse button and select End Snap  from the popup.

*  Position the cursor box over the upper end of the lens aperture and click the primary mouse button.

If you have done this successfully, Raytrace will draw the rays emanating from the source and striking the lens. The resulting refracted rays will also be drawn.

It may be that the refracted rays do not extend far enough to cross and show the image position. You can change the length of these rays by dragging their end points but this can be tedious. Another way is to change their default length. Since it may be that the image position is virtual it also will be a good idea to generate back-projected rays from the refracted rays.

*  Select the three refracted rays by positioning the "select" cursor over each in turn and clicking the primary mouse button while holding the control key down.

Normally when you select an object the previously selected objects are un-selected; holding the control key down allows multiple objects to be selected. Once you have all three rays selected continue...

*  Select Ray... from the Modify menu.

A dialog box will appear.

*  Check the box next to Back Projection and enter a relatively large number in the Default length box (about 1000 should do).

*  Click on the Fertility and also on the Default Length  buttons in the Apply to all rays box.

*  Click on OK .

The rays will be updated. They should now extend 1000 drawing units out as well as having dash-dot back projections. You might like to make the back projection rays longer in the same manner.

To see the entire ray diagram you can zoom to the extents of the diagram.

*  Select Extents from the Zoom menu.

You can zoom in to a more appropriate scale.

*  Select In from the Zoom menu.

*  Position the cursor at one corner of the region which you want displayed.

*  Click once on the primary mouse button and drag out the rectangle to the surround the region you want displayed then click the primary mouse button once.

The scale will be such that at least all of the region you defined will appear within the window. You can pan the display about using the scroll bars on the edges of the Raytrace window. See Zoom for more information.

Now you can drag the object shape or the lens about and see what happens. Since the point source was anchored to the object and lens using snaps, the rays will track the motion automatically.

It is not necessary to create the object shape but its a nice touch; you can simply create a point source and drag it around directly if you want.

You might like to try dragging the focal length of the lens or the lens aperture in the same manner as described in the previous example.

You might also like to force the middle ray from the source through the centre of the lens as is common in the text book ray diagrams.

*  Select the middle ray.

*  Position the select cursor over the end where it touches the lens and click the primary mouse button.

This is the way you normally drag a ray, in this case, because the ray emanates from a source a dialog box appears asking whether you want to affect all the rays in the source with the dragging.

*  Click on the Drag only this ray button and drag the ray around.

To make the ray pass through the middle of the lens, use a Mid point snap.

*  Click once on the secondary mouse button and select Mid point Snap  from the popup.

*  Position the cursor select box over any part of the lens aperture and click the primary mouse button.

The ray will snap to the middle of the lens. However, it will not remain there if you now drag the lens or object around - only the extreme rays of the source can be anchored to any objects.

You might like to anchor another point source to the other end of the object shape in the same manner as described above so that you can locate both ends of the image. If you do this then you can attach a tape measure to the image points and it will look like an image of the object which will be updated as the object is moved. The next example shows you how to create tape measures and protractors and attach them to various objects including ray intersections.

Finally, change the lens to a diverging thin lens and see what happens.

*  Select the lens and select Modify -- Element >> Make Diverging from the Modify menu.

Next example


Using tape measures and protractors
Guided example: Using tape measures and protractors

An important feature of Raytrace is the ability to make measurements on the ray diagrams. You can measure distances using tape measures and angles using protractors.

Begin by ensuring that the Raytrace work area is completely clear.

*  Select All from the Clear menu.

Now create a circular arc surface element:

*  Select Element from the Create menu.

*  Pick a start point somewhere above the middle of the raytrace window.

*  Click on the secondary mouse button and select Circular Arc from the popup.

*  Pick the end point of the arc some distance away from the starting point.

Once the end point of the arc is specified you need to specify the direction of the tangent at the start point. The cursor should now be in the "tangent point" form (an arrow and the word "Tang't").

*  Move the cursor out at some angle to the direction you chose for the end point.

*  Click on the primary mouse button.

The arc segment will now be drawn. Since we are making a simple arc reflector, this is all we need at this stage.

*  Click on the secondary mouse button and select Surface  from the popup menu.

Measure the arc radius by attaching a tape measure between the centre of this arc and the middle of the arc itself.

*  Select Tape Measure from the Create menu.

*  Click on the secondary mouse button and select Centre Snap  from the popup menu.

*  Position the centre select cursor somewhere over the arc segment and click the primary mouse button.

*  Click on the secondary mouse button and select Mid point Snap  from the popup menu.

*  Position the Mid pnt select cursor somewhere over the arc segment and click the primary mouse button.

A tape measure will now be drawn from the centre of the arc to its middle. The tape measure will be dragged along with the arc. Try this out:

*  Select the arc segment.

*  Position the select cursor over one of the arc's control points and click the primary mouse button.

*  Drag the arc shape about and click on the primary mouse button when done.

The tape measure by default displays the distance and direction in degrees, this can be changed.

*  Select the tape measure by clicking the primary mouse button with the select cursor over some part of the tape measure line. (It can be over the line where it is obscured by the text.)

*  Select Tape Measure... from the Modify  menu.

*  Select one of the options by clicking on the radio buttons in the dialog box that appears then click on OK.

Now create a plane source with two rays that hit the reflector from the convex side.

*  Select Source >> Plane from the Create menu.

*  Specify only 2 rays from the source.

*  Position the base point somewhere on the convex side of the arc segment and the aperture points so that the source will strike the reflector.

Now create a protractor to measure the angle between the reflected rays.

*  Select Protractor from the Create menu.

The cursor will change to the Centre point form indicating that you should specify the point about which the angular displacement will be measured.

*  Choose a Ray Intersection Snap .

The cursor will change to the Ray 1 select form.

*  Position the Ray 1 select cursor over one of the reflected rays and click once on the primary mouse button.

The cursor will change to the Ray 2 select form.

*  Position the Ray 2 select cursor over the other reflected ray, hold the control key down and click once on the primary mouse button.

This defines the centre as the intersection of the two reflected rays. Now attach the ends of the protractor to either the mid point or either of the ends of the reflected rays. We will use the mid point in this example.

*  Choose a Mid point Snap .

*  Position the Mid point select cursor over of the reflected rays and click the primary mouse button.

*  Position the Mid point select cursor over the other reflected ray and click the primary mouse button.

The protractor will now be drawn and the angle is indicated in degrees. You can change to radians by selecting the protractor and using the Modify -- Protractor menu item. You can now drag the plane source about and see the angle change. A good use for this sort of thing is shown in the ray diagram RAINBOW.RAY which comes with Raytrace. In this diagram protractors measure the angle between an incoming ray and the ray after deflection by internal reflection and refraction in a spherical drop.

Sometimes tape measures and protractors interfere with the viewing of the ray diagram by making it cluttered. You can toggle the display of tape measures and protractors by selecting the Show Tape Measures or Show Protractors items from the Options menu and only turn them on when you want to look at the readouts. Alternatively you can choose the None  option from in the Modify -- Tape Measures (Protractors) dialog box - in this case the tape measure or protractor is still drawn but no readout is displayed.


How do I ... ?

Select on of the topics below:

Use the mouse with Raytrace

Make an element

Make a ray

Make a source

Measure a distance

Measure an angle

Select an object

Move a point or object

Annotate my ray diagram


Cursor prompt

Raytrace prompts you about the action being performed with the mouse at any given time. The raytrace cursor consists of either: a small box, an arrow or a cross and a word. For example, if Raytrace is expecting you to select an entity (ray or element) then the cursor will consist of a small box and the word "Select". If Raytrace is expecting you to pick the end point of a ray to be drawn then the cursor will consist of an arrow and the word "End". If you are specifying the start point of a ray as snapping to a grid intersection then the cursor consists of the cross and the word "Start".

If the cursor contains a small box then you are expected to select or identify some entity on the screen. For example if snapping to the end of a ray, position the cursor so that the end of the ray is somewhere within the small box then click the primary mouse button.

If the cursor contains an arrow then you are expected to position the tip of the arrow at the point of interest and click the primary mouse button once.

"Arrow" type cursors which prompt you to specify a point have "Grid Snap" counterparts. If the snap to grid option is set then the arrow in the cursor is replaced by a cross. The point you specify will always snap to the grid intersection closest to the centre of the cross.

See also: Snapping


Default fertility of projected rays

Now forward projected rays, by default have their fertility set to Forward Project only, so that they will project across elements they encounter.

Similarly, back projected rays have their default fertility set to Back Project only.

You can manually change the fertility of reflected rays after they have been created to some other setting if you want.


Snapping onto Tape Measures

In previous versions of Raytrace, snaps could only be used on elements and rays. You can now use end, middle and perpendicular snaps on Tape measures.

For example, you could create a tape measure whose ends were snapped to the mid point of an arc and the arc's centre. You could then snap a point source or annotation to the middle of that tape measure - the point that corresponds to the par-axial focus of the arc. Then when the arc was dragged the tape measure and the linked source or annotation would move correctly.


Snapping

Snaps will be familiar to anyone who has used a CAD package. Briefly, they serve two purposes: The first is to enable you to precisely specify or identify a point relative to some part of the ray diagram. The second is to allow linking some object (sources, tape measures and protractors) to points within the diagram so that when the diagram changes the linked objects are updated to reflect the new position of specified points. To make use of a snap, click the secondary mouse button once. For some operations this immediately presents you with a menu containing various types of "snaps". For other operations the snaps are listed in a second level popup which is accessible from the Snaps > item. Alternatively, snaps can be selected by a single key press, see: Snap shortcut keys

Generally you will position the point that you want to snap to, within the select box of the cursor, for example, the end of a line. However in some case, such as snapping to the centre of a circular arc or the focus of a conic segment, you position the select box over the arc or conic segment itself.

There are three snaps where this is not the case:

Ray Intersect Snap

When you choose this item from the snaps menu you must specify the two rays for which you want the intersection. The cursor changes to the Ray 1 select form; select one of the rays. The cursor will then change to the Ray 2 select form. You must hold the control key down when you select the second ray. If you do not then the ray you select is taken as the first ray and the cursor will stay in the Ray 2 select form.

Abs Coords

When you choose this item from the snaps menu a dialog box appears in which you can enter the cartesian coordinates of the point you want. By using this feature you can draw ray diagrams which are perfectly scaled copies of real systems.

Rel Coords

This option allows you to specify a point as a displacement relative to some base point. When you choose this item the cursor changes to the base point form; you must select the base point - you can use a snap to do this if you want - a dialog box then appears and you enter either the cartesian or polar displacement from the base point. For polar displacements the angle is specified in degrees. The dialog box also contains a button, Base = Previous point . If you click on this then the base point is set to the previous point selected. This feature allows you to create and element and specify a vertex relative to the last vertex.

When you specify a snap, Raytrace does not accept the selected point unless the snap is successful. For example, if you specify a centre snap and do not position the cursor over an arc segment when you click the primary mouse button then the snap is unsuccessful and the cursor remains in the centre select form. You can change to another type of snap or you can select None from the snap menu to return to free hand pointing.

Grid Snap

This snap option is slightly different to the others. A small cross is displayed in the cursor rather than a box (in the case of the select cursor the box has small cross arms added to it). A Grid Snap will always succeed, snapping to the grid intersection closest to the point defined by the small cross in the cursor. You do not need to have the grid displayed to use a grid snap. See also: Options -- Show Grid and Options -- Snap to grid

Note that you cannot snap to tape measures, protractors or annotations.


Snap shortcut keys

You can select a snap using the secondary mouse button and selecting it from the popup menu or simply by pressing a single key:

End snap	---	Press E

Centre snap	--- 	Press C

Tangent snap	--- 	Press T

Mid point snap	--- 	Press M

Focus point	--- 	Press F

Conic Vertex	--- 	Press V

Ray intersection	--- 	Press I

Perpendicular snap	---	Press L

Absolute coords	---	Press A

Relative coords	---	Press R

None	---	Press N

In addition there are two more related short cut keys:

To turn the grid on and off simply press the G key.

To toggle the snap to grid option press the S key.


Function short cut keys

Ray colour change:

Press Shift F2 to cycle the colour of all selected rays through the sequence red-green-blue

Extended select:

Pressing Shift F3 is the same as choosing the menu item Edit -- Select extended

Ray fertility change:

F2 --- Toggles Reflect always option

F3 --- Toggles Reflect if no refraction option

F4 --- Toggles Refract option

F5 --- Toggles Show normal option

F6 --- Toggles Foward project option

F7 --- Toggles Back project option

F8 --- Toggles Parent by reflection option

F9 --- Toggles Parent by refraction option


Show Grid
Menu: Options -- Grid

Raytrace allows you to display a grid as an aid in drawing objects. Check this menu item to display a grid. If the current grid size is unsuitable for the scale to which you have zoomed then the grid will not display - it will display if you later change the zoom scale to one where the grid size is appropriate.

As a short cut you can toggle the display of the grid simply by hitting the G key at any time.

You can snap to the grid intersection points using a grid snap.See also: Options -- Grid size


Grid size
Menu: Options -- Grid size

You can specify the x and y spacing of the drawing aid grid using this menu item. The grid size is specified in drawing units. If you choose a grid spacing which is too small or too large to be displayed meaningfully at the current zoom setting then you will be prompted that the grid will not be displayed. However the grid will still be active at the selected size for snapping purposes. The grid spacings in X and Y directions are independent and it is possible to display only the horizontal or vertical lines if one of the spacings is inappropriate.


Grid snap option
Menu: Options -- Snap to grid

If this option is checked then Raytrace will always snap to the nearest grid intersection as if a grid snap had been selected.

This option can be over-riden by selecting another snap type (including none). You can toggle this option simply by pressing the 'S' key at any time.


Selecting

If the cursor appears as a small box (called the select box) and the word Select then you can select entities for various operations, for example, you can select a refracting element and change its refractive index or drag its shape.

Position the select box so that part of the object that you want to select appears inside the box and click the primary mouse button.

All entities that cross the box will be selected in the one operation.

To select a number of objects hold the control key down while selecting the objects with the primary mouse button.

To clear the selection click on the primary mouse button with the cursor over a blank area of the display (with the control key released).

To select a source select one or more of the rays coming from that source.


Dragging

If you click on the primary mouse button with the select cursor positioned over a drag handle then you can drag the point to a new position. Generally Raytrace will update the ray diagram as you drag the point. See Update on Ray Drag and Update on Element Drag.

If you click on the outline of an object away from a drag handle then you can move the whole object about. For elements, if you hold the control key down as you click then you can drag the individual segment of the element.

To move a group of objects, select them and use the Cut and Paste menu items or use Modify -- Move.

See also: Selecting, Fine drag mode, Ortho drag mode


Sources

Sources are a means of generating groups of rays. Two source types available: point and plane sources.

A source allows a group of rays to be dragged with one operation. Sources can also be linked to elements so that the rays will always strike the element even when it is dragged.

For information on creating a source and more information about sources see: Create -- Source.


Menus
Raytrace Menus

For specific help on a menu item select the top level menu:

File

Edit

Modify

Clear

Zoom

Create

Defaults

Options

Info


Demo version limitations

If you are using a demonstration version there are a number of restrictions which apply:

Maximum number of rays = 20

Maximum number of elements = 1

Maximum number of segments in an element = 4

Maximum number of tape measures = 1

Maximum number of protractors = 1

Maximum number of point sources = 1

Maximum number of plane sources = 1

Menu items:

Print, Create Meta File, Cut, Copy, Paste, Mirror, Rotate, Join and Explode

are all disabled.

If you find Raytrace interesting and useful then please send for a registered copy of the program.


Raytrace limits

The number of entities which can be used in any one model are fixed at:

Maximum number of rays = 200

Maximum number of elements = 50

Maximum number of segments in an element = Unlimited (subject to memory)

Maximum number of tape measures = 10

Maximum number of protractors = 10

Maximum number of point sources = 20

Maximum number of plane sources = 20


File menu
Menu: File

New

Save

Save As

Open

Directories...

Print

Create Metafile

Run script

Quit


New
Menu: File -- New

Selecting this menu item clears the entire contents of the ray diagram and resets some options to their default values. The options that are reset are:

Default ray settings

Child ray settings

Show Red, Green and Blue Rays all checked

Show Rulers, Protractors, Annotations and Trails all checked

Pause Trails unchecked.

If you want to clear the ray diagram without reseting these options then choose All from the Clear menu.

You can recover from using this command with the undo command.


Save
Menu: File -- Save

Choosing this item saves the ray diagram using the name under which it was previously saved or prompts you for a name if it is a new diagram.


Save
Menu: File -- Save As

Select this item to bring up a standard Windows "Save As" dialog box.

Enter the name of the file and click on OK or double click on one of the existing file names displayed in the file list box.

By convention files should be saved with the extension .ray  but this is not necessary - you may use any extension or omit the extension.

You will be prompted if you try and overwrite an existing file.

All default settings and options, including the Raytrace window size and position are saved with the file.


Open
Menu: File -- Open

Select this item to bring up a standard Windows "Open File" dialog box.

Enter the name of the file and click on OK or double click on the filename in the file list box.

You must enter the extension if you type in the filename.

If you meant to save the existing ray diagram before opening a new one then you can recover with the undo command.

All default settings and options are set to those active when the file was saved. This includes the size and position of the Raytrace window.


Directories
Menu: File -- Directories

Selecting this menu item starts a dialog box which allows you to change the directories that Raytrace uses for various purposes. There are three directories that you can change:

System

This is the directory in which Raytrace expects to find the help file RAYTRACE.HLP and the material file RAYTRACE.MAT. It is also the directory which is used by default when selecting an element library file although you can select an element library file from any directory.

Undo

This is the directory in which Raytrace will store the RAYTRACE.UDO file.

Work

This is the default directory that is used when you save or open a ray diagram although you can save or open a file in any directory.

When entering a directory name the final backslash character must be present. For exampleC:\RAYTRACE\ not C:\RAYTRACE

If you leave a directory blank then the current working directory (the one from which Raytrace was started) will be used.

The directories are saved in a file called RAYTRACE.DIR which is created in the directory from which Raytrace is initially run.


Print
Menu: File -- Print

Selecting this menu item will cause Raytrace to print the current view of the ray diagram. A standard Windows print dialog box comes up. The diagram will be scaled so that the visible window fits the page.


Create Metafile
Menu: File -- Create Metafile

Selecting this menu item will cause a windows meta file called raytrace.wmf to be created. The file will contain the meta graphics commands which will draw the visible portion of the ray diagram.


Run script
Menu: File -- Run script

Choosing this menu item lets you open a script file.

Script files are a list of text commands, like a program, which control Raytrace. You can use script files for pre-set demonstrations or to provide instructions to users (students) who must perform a specific task.

The "Quick Tour" is an example of the use of Raytrace scripts.

A script file is a standard ASCII file and you may create your own with you favourite editor. You should be proficient with using Raytrace before you attempt to do this however.

By convention, script files should have an extension ".rsc" but this is not mandatory.

As Raytrace is developed further it is expected that the script facility will be expanded and made easier to use depending upon feedback from users. If you want to make use of the script facility and you need a particular function or some other special requirement then please contact IME Software to discuss the implementation.

The script language is based on single commands on each line. The command syntax is very simple and each command corresponds to a single action in Raytrace.

The first character on each line determines how the line is interpreted:

Any line beginning with the percent character, %, is considered to be a comment and is ignored.

Any line beginning with a period character, ., is considered to be a command (see below).

Any line beginning with a colon character, :, is considered to be a label. The label follows the colon directly, e.g. :LABEL and is delimited by blank space or the end of the line. Labels are used in conjunction with commands like .goto

Any line beginning with any other character (including blank spaces) is considered to be text which will be displayed in the script dialog box. This text should be directed at the person running the script, i.e. instructions on what should be performed or comments on what is happening.

Below is a heavily commented example script (actually the second example in the "Quick Tour" with the actual commands in this colour:

% A script may be run from within another script

% (see the last line of this script)

% If this is the case then including the following command

.run_from qcktour1.rsc

% allows the user to go back to that script by clicking

% on the "Previous" button in the script dialog box.

% The next line is the same as choosing File -- New

.file_new

% New text instructions are begun with the command:

.new_text

Please wait a few moments while the script

creates some elements.

% A blank line in the text causes a line break

% Two blank lines causes a blank line in the instructions

% In this example an element is created

% The next command is equivalent to choosing

% the menu item Create -- Element

.create_element

% The next three commands simply specify the

% coordinates at which the mouse would be clicked

% in the Raytrace window to specify the vertices of

% element

% ".fast_click" does not actually move the cursor

.fast_click 220 280

.fast_click 120 160

.fast_click 320 160

% The element creation is finished with the .region

% command - same as using the popup menu in Raytrace

.region

% Another two elements are created in this example

% This one is a rectangular region

.create_element

.fast_click 400 280

.fast_click 400 80

.fast_click 460 80

.fast_click 460 280

.region

% This one is a circular arc reflecting surface

.create_element

.fast_click 215 132

% The next command is the same as using the popup menu

% in Raytrace to switch to drawing arc segments

.arcseg

.fast_click 344 75

.fast_click 264 56

.surface

% Next some annotations are created but for the moment

% they are not wanted so they are hidden. The next

% command is the same as unchecking the

% menu item Options -- Show > Annotations

.hide_annotations

% The text of the annotation follows the command

% on the same line

.annotation Try starting a ray here

% Next the base point of the annotation is specified

.fast_click 150 323

% Then the leader end point

.fast_click 125 300

% And another annotation

.annotation and ending it here

.fast_click 190 206

.fast_click 100 195

% A new set of instructions to the user is begun

.new_text

Raytrace can trace rays through multiple complex elements.

Click on "Continue" to see a ray created.

% These instructions are only displayed when the next

% "." command is encountered - in this case the .pause

% ".pause" stops the script until the user clicks on

% the Continue button in the script dialog

.pause

% Then a ray is created

.create_ray

% This time the cursor movement is done with

.move 565 209

% some delays (700 milliseconds here) to make

% it easier to follow

.pause 700

% .click moves the cursor unlike .fast_click

.click 565 209

.pause 700

.move 474 177

.pause 700

.click 474 177

% Finish creating the ray - like using the popup menu

.finish

% Another set of instructions are prepared

.new_text

Click on "Continue" to try this for yourself.

.pause

.new_text

To create a ray choose ...

% Some lines have been deleted here

Click on Continue to return to the script.

% Now the annotations are displayed

.show_annotations

% and full control of Raytrace is given to the user.

% Control is returned to the script only when the

% user clicks on the Continue button in the script

% dialog box

.user_control

% And finally control is passed to another script

.script qcktour3.rsc

The available commands in the script language are as follows. Arguements to the commands are shown in this colour. Optional arguements are enclosed in square brackets. Alternative arguements are separated by the | character.

Any numeric value arguements can be replaced by the word UserInput and this will prompt the user to enter a numeric value using a dialog box.

Set the default user input value for subsequent UserInput arguements

.default_input value

Sets the upper and lower limits of the value that the user can enter in response to subsequent UserInput arguements.

.input_limits min max

Sets limits on mouse movements when using either .allow_drag or .user_click commands. The cursor can be moved outside the defined region but Raytrace will limit its response to points inside the region.

.mouse_limits MinX MinY MaxX MaxY

Move the cursor to x,y (takes about 1 second)

.move x y

Move the cursor to x,y without any delay

.fast_move x y

Move the cursor to x,y and then click primary mouse button. Displays a "Click" cursor as a visual indication..click x y

Perform the action that would occur if the primary mouse button was clicked at x,y but doesn't move the cursor.

.fast_click x y

Like .click, .fast_click and .move except the cursor is positioned relative to the last mouse click.

.click_rel x y

.fast_click_rel x y

.move_rel x y

Save the last mouse click position

.save_point

Restore the last mouse click position

.restore_point

Exit the script dialog box

.close_script

Set the source drag option to drag a single ray

.drag_single

Same as selecting File -- New

.file_new

Same as selecting File -- Open and choosing a file called "filename"

.open filename

If delay is omitted then wait until the user clicks on the "Continue" button before proceeding. If delay is given then waits "delay" milliseconds.

.pause [delay]

Clears the current text. Subsequent text is only displayed on the nextcommand.

.new_text

If dragging has been initiated by the script then allow the user to continue the dragging. Clicking the primary mouse button returns to the script without ending the drag operation.

.allow_drag

Allow the user to choose the next clicking point. If the user clicks outside the currently defined mouse limits and the label arguement is given then execution of the script jumps to the LABEL otherwise execution continues with the following line.

.user_click [LABEL]

Passes control to the user who can then use any Raytrace functions. Control returns to the script when the user clicks on the "Continue" button.

.user_control

If any elements are selected then set their refractive indices to the values specified otherwise set the default values for new elements.

.refractive_index nred ngreen nblue

Same as choosing Create -- Protractor, must be followed by appropriate".click" or ".fast_click" commands

.create_protractor

Same as choosing Create -- Tape Measure, must be followed by appropriate".click" or ".fast_click" commands

.create_tapemeasure

Changes the options for selected tape measures. All arguements must be given.

.tapemeasure_options distance_decimals angle_decimals leader|noleader distance|cartesian|degrees|radians|none

Changes the options for selected protracors. All arguements must be given.

.protractor_options decimals leader|noleader degrees|radians|none

Same as  choosing Create -- Element, must be followed by appropriate".click" or ".fast_click" and ".region" or ".surface" commands.

.create_element

Same as  choosing Create -- Ray, must be followed by appropriate".click" or ".fast_click" and ".finish" commands.

.create_ray

Terminate creation of a region element.

.region

Terminate creation of a surface element.

.surface

After a ".create_element" command specifies that the element will be a shape.

.shape

Terminate creation of a shape element.

.end_shape

After a ".create_element" command specifies that a special type ofelement, thinlens or par-axial mirror is to be created.

.converging_thinlens

.diverging_thinlens

.par-axial_mirror

Terminate creation of rays.

.finish

Switch to arc segments when creating an element.

.arcseg

Switch to radius/end method of specifying arc segments.

.radius_end

Switch to centre/end method of specifying arc segments.

.centre_end

Switch to chord/tangent method of specifying arc segments.

.chord_tan

For radius/end and centre/end arc creation methods set the direction of the arc.

.clockwise_arc

.anticlockwise_arc

Switch to creating line segments when creating an element.

.lineseg

Switch to creating conic segments when creating an element.

.conicseg

Specify that a snap will be in force for the next click.

.end_snap

.perp_snap

.centre_snap

.mid_snap

.focus_snap

.vertex_snap

.tangent_snap

.intersect_snap

Show or hide the grid.

.show_grid

.hide_grid

.grid_size x y

Toggle the snap to grid function.

.grid_snap

Same as choosing Edit -- Delete

.delete

Same as choosing Edit -- Undo

.undo

Same as choosing Edit -- Select All > xxx

.all_rays

.all_elements

.all_tapemeasures

.all_protractors

.all_annotations

.all_trails

Same as choosing Clear xxx

.clear_rays

.clear_elements

.clear_tapemeasures

.clear_protractors

.clear_annotations

.clear_trails

Zoom functions. In/Out be followed by appropriate ".click" or ".fast_click" commands.

.zoom_reset

.zoom_extents

.zoom_in

.zoom_out

.zoom_previous

Change Options -- Quiet snap setting.

.quiet_snap

.loud_snap

Toggle the fertility of selected rays or if no rays are selected then the default setting for both created and child rays.

.reflect

.reflect_if_no_refract

.refract

.normal

.forward_project

.back_project

.parent_reflect

.parent_refract

Like the keyboard action they describe.

.control_key_down

.control_key_up

.control_shift_down

.control_shift_up

Set the default length for all selected rays or if none selected then for newly created rays.

.set_length x

Change the colour of selected rays or the default colour for new rays.

.red

.green

.blue

Same as choosing Create -- Annotation. Must be followed by appropriate ".click" or ".fast_click" commands.

.annotation text

Show hide different types of object.

.show_protractors

.hide_protractors

.show_tapemeasures

.hide_tapemeasures

.show_red

.hide_red

.show_green

.hide_green

.show_blue

.hide_blue

.show_annotations

.hide_annotations

Same as choosing Modify -- Move. Must be followed by appropriate ".click" or ".fast_click" commands to specify dsplacement.

.move_selection

Same as choosing Modify -- Mirror. Must be followed by appropriate ".click" or ".fast_click" commands to specify mirror line.

.mirror

Same as choosing Modify -- Scale. Must be followed by appropriate ".click" or ".fast_click" command to specify centre of scale operation.

.scale factor

Same as choosing Modify -- Rotate and specifying a fixed rotation angle. Must be followed by appropriate ".click" or ".fast_click" command for the centre of rotation.

.rotate angle

Same as choosing Modify -- Rotate and specify the rotate by drag option. Must be followed by appropriate ".click" or ".fast_click" commands to specify centre and reference direction and then either a ".allow_drag" and/or ".click" command.

.rotate_drag

When dragging the tangent control point of an arc segment, the same asclicking on the secondary mouse button and using "Set arc radius" toset the arc radius to "radius"

.set_radius radius

Like clicking in the scroll bars on the Raytrace window.

.pan_left

.pan_right

.scroll_up

.scroll_down

Specify the number of rays in a newly created source.

.source_ray_count N

Same as choosing Create -- Source > xxx. Must be followed by appropriate ".click" or ".fast_click" commands.

.create_point_source

.create_plane_source

Same as choosing File -- Save As and specifying "filename".

.save filename

Runs a script named "filename".

.script filename

Specifies the script file which will be activated if the user clicks on the "Previous" button.par.run_from filename

Create a trail - must be followed by appropriate click type commands.

.create_trail

Same as choosing Modify -- Reset Trails.

.reset_trails

Same as choosing Modify -- Pause Trail Update.

.pause_trails

Same as using the Options -- Max path depth menu item and entering N.

.max_path_depth N

Same as choosing the menu item Modify -- Auto Trace. The option number between 1 and 3 sets what is traced, i.e. centre/base, end1 or end2 for a source or start, end, whole for a ray.

.auto_trace N

Go to the first occurence of a line beginning ":LABEL" in the current script

.goto LABEL

Present the user with a dialog box telling them to read the instructions in the Raytrace Script box and choose either YES or NO. If YES is chosen the go to the first occurence of a :LABELYES otherwise go to :LABELNO. If LABELNO is ommitted and NO is chosen then execution of the script continues sequentially

.yes_no LABELYES [LABELNO]


Exiting RAYTRACE
Menu: File -- Quit (Exiting RAYTRACE)

You may exit Raytrace at any time simply by selecting this menu item or double clicking on the system menu bar at the top left hand corner of the window.

If you inadvertently exit by mistake then you can recover the lost work by immediately selecting the undo menu item when next you run Raytrace.


Edit menu
Menu: Edit

Undo

Delete

Select All >

Select Child Rays

Select Group

Select Extended

Cut

Copy

Paste

Library >


Undo
Menu: Edit -- Undo

Choosing this menu item will "undo" the previous modification of the ray diagram. Up to five operations may be undone.

Most serious operations can be undone, including quitting without saving!

Zooming cannot be undone - use the Zoom -- Previous menu item instead.

The undo operation uses files called raytrace.udx where x is a digit between 0 and 4 do not delete these files while running Raytrace. These files are created or modified whenever you perform some action on the ray diagram. If you are running Raytrace with the undo directory set to a floppy disk then you will notice a significant pause while the files are written. Best advice is: only run Raytrace from a hard disk or at least set the undo directory to one on a hard disk.

Beware that undo also reverses the action of File -- Open but it does not change the filename associated with the ray diagram.


Delete
Menu: Edit -- Delete

Choosing this menu item will delete any selected objects from the ray diagram.

A single level of delete can be undone.

Deleting a ray that you have drawn will delete all the child rays associated with it. Deleting a child ray will have no effect since it will be regenerated by its parent ray. You must change the parent ray fertility (See: Modify -- Rays...) to get rid of any unwanted child rays.

You can simply hit the delete key to perform the same operation as this menu item.


Select All
Menu: Edit -- Select All >

There a five options in this sub-menu, they allow you to select all the rays, elements, tape measures, protractors or trails in the ray diagram. This can be useful for all sorts of things, for example, changing the colour or other default parameters of all the rays in a diagram or changing the refractive index of all the elements in the diagram.


Select extended
Menu: Edit -- Select extended

Choosing this menu lets you select objects within the ray diagram by drawing a rectangular box (in the same manner as a zoom box is drawn). Any objects which lie within or cross the rectangular box will be selected.

A short cut key to this operation is to press Shift F3.


Select Child Rays
Menu: Edit -- Select Child Rays

Causes all the rays that are drawn as a result of the selected rays existance to be selected. This can be useful to calculate path lengths or for copying rays with their fertility structure.


Select Group
Menu: Edit -- Select Group

Select an element and then use this command to select all other elements associated with this group.


Cut
Menu: Edit -- Cut

Copies the selected objects to the clipboard and removes them from the ray diagram. The objects can then be pasted into other ray diagrams or at a different position in the current diagram.

You must select a base point which will be mapped onto the point you pick when you paste the objects back into the diagram.


Copy
Menu: Edit -- Copy

If any objects are selected then this menu item copies them to the clipboard. The objects can then be pasted into other ray diagrams or at a different position in the current diagram.

You must select a base point which will be mapped onto the point you pick when you paste the objects back into the diagram.

If no objects are selected then a copy of the visible portion of the ray diagram is copied into the clipboard - this can then be pasted into other drawing packages or word-processing programs. This cannot be pasted into a ray diagram since it is only a copy of the picture not the information about the objects that all calculation of the ray diagram.


Paste
Menu: Edit -- Paste

Inserts the contents of the clipboard (must have been set by using either copy or cut in Raytrace) into the ray diagram. You must select a point onto which the base point picked when cutting or copying will be mapped.


Library functions
Menu: Edit -- Library

An element library contains a list of elements which have been predefined. You can paste these into your ray diagram rather than having to draw your own elements each time or cut and paste them from other ray diagrams.

There are three items in this submenu concerned with using element libraries:

Paste from...

Save to...

Manager...


Paste from library
Menu: Edit -- Library > Paste from...

This menu item starts the Paste from Library dialog box. To paste an element use the following steps:

Select a library file by press the Change Library ... button and selecting an element library using the "open file" type dialog box. Element libraries have an extension of ".ELB" by convention.

(This step need only be used the first time you use any of the Paste from library, Save to library or Library Manager menu commands in a given Raytrace session or when you want to change to a different library file.)

Once a library file has been selected, the file name will appear at the top left corner of the Paste from Library dialog box and a list of the available elements in the library will appear in the list box on the right hand side. Select the element you want either by clicking on a name in the list box or typing the name into the edit box in the top right hand corner.

If the Show preview check box is checked then a preview drawing of the element will appear in the space on the left hand side of the dialog box. The "start point" of the element is indicated by a small square box on one of the element vertices. This is the point at which the original construction of the element was started and will be the point which is mapped onto the base point you select as outlined below.

Press the Paste button or double click on the name of the element in the list box to paste the element into your ray diagram.

One you have pressed the Paste button the dialog box will minimise itself to a small box containing two buttons: Close and Restore. These are explained below.

To complete the pasting operation you need to select the point in the ray diagram at which the element will be positioned. The element will be positioned so that the point indicated by the small square  box in the preview will be at the point you select here.

To change the size of the element when you paste it, check the Scale on paste check box before pasting the element. In this case you will be prompted (by the cursor) to select two corners of a rectangle in which the element will be scaled to fit. The aspect ratio of the rectangle is constrained to be the same as a rectangle which just contains the element being pasted.

When you paste an element the from Library dialog box shrinks to a smaller dialog box containing just two buttons. This allows you to paste the element with a minimum of clutter on the screen. The small dialog box can be moved so that it does not cover important parts of your ray diagram. When you want to paste another element from the library simply click on the Restore button to make the complete dialog box reappear. If you have finished all the pasting of elements that you want to do then click on the Close button to remove the small version of the dialog box.

If when the preview of the element appears the word Deleted appears in the middle of the preview area this means that the element has been marked to be removed from the element library when next it is purged using the Library Manager. However, you can still paste the element in the manner described above.


Save to library
Menu: Edit -- Library > Save to...

To add an element to an existing element library first select the element in your ray diagram and then select this menu item. A Save to Library dialog box will appear.

If you have not already selected a library file using either the Paste from Library or Library Manager dialog boxes then use the Change library... button to select a library file.

Type the name you wish to use to describe the element into the edit box and press the Save button. You must select a unique name when saving a new element - you will be prompted if you do not.

A list box containing the names of elements already in the library is shown to help you in choosing a unique name, a preview of an existing element will be displayed if you click on a name in the list and the Show preview  check box is checked.


Library manager
Menu: Edit -- Library > Manager...

Use this menu item if you want to modify the contents of a library file in some way other than adding a new element. A dialog box will appear.

If you have not already selected a library file using either the Paste from Library or Save to Library dialog boxes then use the Change library... button to select a library file.

Use the Create Library... button to make a new library file. You might find this useful to keep elements for a particular demonstration or project all together or simply to hold useful elements that you have created yourself. Avoid putting more than a few dozen elements into a single library - you can do it if you want but you will find it easier and quicker to find and paste your elements if they are separated into small logical groups contained in separate files.

To delete an element from the library, click once on its name in the list box or type the name into the edit box then press the Delete button. The element is not deleted at this stage it is simply marked to be removed when the Purge button is pressed.

To change the name of an element click once on its existing name in the list box or type the existing name into the edit box then press the Rename button.

At the bottom right side of the dialog box are three radio buttons. You can use these to control which names are displayed in the list box. If Normal  is selected then only elements which have not been marked for deletion are displayed. If Deleted is selected then only the names of elements which have been deleted are shown. Select Both to see the names of all elements regardless of whether they are marked for deletion or not.

Elements that have been deleted still occupy space in the library file, can still be pasted and prevent you from using their name for a new element. To remove them completely you must press the Purge button. Before the Purge button has been pressed you can undelete elements: Select either the Deleted or Both radio buttons, click on the element name in the list box or type the name into the edit box then press the Undelete button.


Modify menu
Menu: Modify

Ray...

Element >

Source >

Tape Measure

Protractor

Wavelengths...

Mirror

Rotate

Scale

Move

Pause Trail update

Reset Trails

Auto trace

Link segments

Unlink segments


Modify Rays
Menu: Modify -- Rays

Selecting this menu item starts a dialog box which allows you to change the properties of selected rays either individually or all together.

At the top left of the dialog box are three radio buttons which allow you to specify the colour of the ray(s). Select the colour you want. Rays inherit their colour from their parent ray so this has no effect on child rays. Changing the colour of a parent ray automatically updates the colour of all its children.

At the top right of the dialog box are three radio buttons for options on the arrow position. Select the option you want.

Below this is a box labelled Fertility which contains eight check boxes. The settings of these check boxes define the ray's fertility, i.e. controls which child rays are generated when the ray interacts with an element.

Reflect Always

Checking this option means that a reflected ray will always be generated. This option is mutually exclusive with the next one down.

Reflect if no refraction

Checking this option means that if a refracted ray exists then the reflected ray will not be generated. If a refracted ray does not exist, either because a critical angle is exceeded or because the element is a reflector, then the reflected ray will be generated. This option is mutually exclusive with the previous option.

Refraction

Checking this option will cause any refracted ray to be generated at interfaces of region elements that the ray hits.

Show Normal

Checking this option will cause a dotted "normal" or "perpendicular to the interface" ray to be drawn where-ever the ray intersects with an element. Normals will not be shown if the ray intersects a thin lens or par-axial mirror.

Foward Projection

Checking this option will cause a dash-dot ray to be drawn past the intersection with an element in the same direction as the incident ray. Foward projected rays behave like any other ray and can have their fertility modified etc.

Foward projected rays are useful for comparing what would have happened if an element did not exist to what happens when it does.

Back Projection

The same as Foward projection but in the reverse direction. Back projected rays are useful for showing the position of virtual images.

Parent by reflection

Checking this option will generate a ray which could have given rise to this ray by reflection at the boundary. Useful for backtracking alternative paths in a ray diagram. A ray generated by this option is still considered a child ray.

This option will have no effect if the ray is itself the child of another ray by means of a reflection.

Parent by refraction

Similar to Parent by reflection but for refraction instead.

At the bottom of the dialog box the number of rays selected is indicated as well as the number of the current ray being modified. You can step through all the selected rays, modifying each individually, by using the Next  and Prev buttons. To apply the changes to all the selected rays click on one of the four buttons in the box labelled Apply to all rays .

When you have finished modifying the rays click on Ok.

The undo button only undoes changes made to a single ray, it will not undo an Apply to all rays  button action.


Modify Element
Menu: Modify -- Element >

This item brings up a popup menu. Select the item of interest from below:

Refractive Index...

Make Regions

Make Surfaces

Make Shapes

Turn Off

Turn On

Make Converging

Make Diverging

Join

Explode

Group

Ungroup

Remove from group


Modify Source
Menu: Modify -- Source >

This item brings up a popup menu. Select the item of interest from below:

Ray count...

Flip point sources

Unlink snaps


Modify Source Ray Count
Menu: Modify -- Source > Ray Count

Select a source by selecting a ray emanating from it then select this menu item. Enter the new number of rays for this source in the resulting dialog box.

Works for more than one source at a time.


Link segments
Menu: Modify -- Link segments

Sometimes you will need to create two elements which match up along one segment exactly. An example of this is a doublet lens or a lens lying on the interface between two different media. While you can construct elements which match exactly using object snaps, the elements are not normally linked (like sources can be linked to elements) so that if you drag one element (segment) the matching segment does not change, leaving a mis-match.

To overcome this you can "link" segments of different elements. To do this, create the two elements but leave a gap between them. Choose this menu item and then select a segment of an element: Segment_1. A rubberband will attach itself to Segment_1. Select a segment of another element: Segment_2. Both segments must be of the same type, i.e. both line, both arc or both conic segments. Thinlens segments and par-axial mirror segments cannot be linked. Also, the closing line of a region element cannot be linked as a segment.

Segment_1 is the controlling segment. If you drag it in any way then Segment_2 will change to match it. If you drag Segment_2 it will revert to the shape of Segment_1 when you complete the drag.

When raytrace tries to match Segment_2 to Segment_1 it will usually need to change the shape or move one of the elements. After selecting the two segments you will be given two options in a dialog box:

Stretch

If you select this option then Raytrace will modify the shape of the element containing Segment_2 by stretching the preceeding segment. If Segment_2 was the first one created within its element then the action is the same as the Move option.

Move

If you select this option then Raytrace will move the entire element containing Segment_2 so that the starting point of the segments overlay.

For both options the segment following Segment_2 will be stretched to allow matching of the end points of Segment_1 and Segment_2.

Segment links are not copied by the Edit -- Copy or Edit -- Cut commands and therefore cannot be pasted. If you want to copy two elements that are linked then you can do so but you will need to establish the link between the elements if you paste them back into a ray diagram.

Note that the direction in which the segments are drawn can be important. Raytrace will flip a segment around to make the match exact in every sense - including direction. So for example, if you draw two rectangular shaped elements side by side, drawing both in a clockwise sense, and link the two sides which are closest then one of the rectangles will turn into a bow tie shape. To avoid this, plan ahead when drawing the elements or flip one of the elements over using the Mirror command.

You may also use this command to link two arc segments within the one element. You can use this feature to create an equi-convex or equi-concave lens shape.See also: Unlink segments


Unlink segments
Menu: Modify -- Unlink segments

To destroy a link between segments simply select one of the elements involved in the link and choose this menu item.


Group elements
Menu: Modify -- Element > Group

If elements are "grouped" then moving any one of the group by dragging will cause the whole group to move. Grouped elements do not share any properties and are not operated on as a group in any other way.

To group elements simply select the elements you want and use this menu item.

To move one element in the group without moving the others, use the Modify -- Move function.

To add an element to a group:

Select one of the elements in the group and the element to be added

Select Edit -- Select Group to select all the elements already in the group.

Select Modify -- Element > Ungroup to destroy the old grouping.

While all the elements are still selected use Modify -- Element > Group to form the new group which includes the new element.

See also: Modify -- Element > Ungroup, Edit -- Select Group, Modify -- Element > Remove from group


Ungroup elements
Menu: Modify -- Element > Ungroup

To remove the grouping of elements, select any member of the group and use this menu item.See also: Modify -- Element > Remove from group


Remove from group
Menu: Modify -- Element > Remove from group

To remove an element from any group with which it is associated select the element then choose this menu item. See Modify -- Element > Group for information on how to add an element to a group.


Flip Point Source
Menu: Modify -- Source > Flip point sources

Select a point source by selecting a ray emanating from it then select this menu item. The end points defining the source will be swapped. So for example if you define a point source and then realise that you have the end points the wrong way round because the rays spread on the opposite side to what you expected use this menu item to flip the source over.

Works for more than one point source at a time.


Unlink source snaps
Menu: Modify -- Source > Unlink snaps

Select a source by selecting a ray emanating from it then select this menu item. If the source was linked to any elements by object snaps then these links will be removed so that the source no longer moves to follow the elements.

Operates on all selected sources.


Modify -- Element > Refractive Index...
Menu: Modify -- Element > Refractive Index...

This menu item starts a dialog box which allows you to vary the refractive index of all selected elements to the three different colours used in Raytrace. You can change the wavelengths of the three colours using the Modify -- Wavelengths... menu item.

You can either:

Adjust the scroll bars to get the refractive indices that you want.

Enter the desired refractive indices in the relevant edit box next to the scroll bars.

Enter the coefficients of the Cauchy equation for a particular substance (if known).

Select a particular material from one for which the refractive properties have already been set.

To do this, click on the  Material... button and select a material from the list box in the dialog box which appears.

The ray diagram will update as you change the refractive indices unless the Update on Element Drag is unchecked in the Options menu.

The changes affect all selected elements except thin lens and par-axial mirror approximations for which refractive index is meaningless.

Surface and Shape elements have latent refractive indices (since thay can be turned into regions; see Make Regions). These latent refractive indices can be changed using this menu item just like regions.

Click on Ok to accept the changes, click on Cancel to revert to the original values.

If you want to define a new material then either enter the Cauchy coefficients or set the refractive indices at three known wavelengths then click on the Save... button and enter a name for the material in the dialog box which appears. If you use a name of a material which is already defined then the new values will over-write the old ones.


Modify -- Element > Make Regions
Menu: Modify -- Element > Make Regions

Selecting this menu item will turn any selected surface or shape elements into refracting regions. The elements are closed by the addition of line segments. The new regions acquire the latent refractive indices of the surface or shape elements.

See also: Make Surfaces and Make Shapes


Modify -- Element > Make Surfaces
Menu: Modify -- Element > Make Surfaces

Selecting this menu item will turn any selected region or shape elements into reflecting surfaces. Closed regions will be opened by deleteing any line segment that was added to close the element when it was a region. The new surfaces retain the element refractive indices in a latent sense so that changing the elements back to regions will recover their properties completely.


Modify -- Element > Make Shapes
Menu: Modify -- Element > Make Shapes

Selecting this menu item will turn any selected surface or region elements into shape elements. Closed regions will be opened by deleteing any line segment that was added to close the element when it was a region. The new shapes retain the element refractive indices in a latent sense so that changing the elements back to regions will recover their properties completely.

This is quick way of temporarily removing the effect of an element from the ray diagram since rays do not interact with shapes.


Modify -- Element > Turn Off
Menu: Modify -- Element > Turn Off

Choosing this menu item "turns off" any selected elements. The elements will still appear unchanged on the screen but rays will not interact with them in any way. You can use this to see what the effect of removing an element is without modifying the drawing in any other way.

See also: Turn On


Modify -- Wavelengths
Menu: Modify -- Wavelengths

This menu item starts a dialog box which allows you to specify the wavelengths represented by the three colours used in Raytrace. Note that the colours Red, Green Blue refer only to the colours as they are drawn on the screen; the wavelength may represent a different colour in the physical world. The units used are nano-metres.


Modify -- Element > Turn On
Menu: Modify -- Element > Turn On

The opposite of Turn Off.


Modify -- Element > Make Converging
Menu: Modify -- Element > Make Converging

Selecting this menu item will make any selected thin lens elements into converging lenses. The magnitude of the focal length is unchanged.

See also: Make Diverging


Modify -- Element > Make Diverging
Menu: Modify -- Element > Make Diverging

Selecting this menu item will make any selected thin lens elements into diverging lenses. The magnitude of the focal length is unchanged.

See also: Make Converging


Modify -- Element > Join
Menu: Modify -- Element > Join

Selecting this menu item will join all selected region, surface and shape elements into one combined element. The order in which the elements were selected determines the order in which they are joined up. The final element assumes the properties of the first selected element, i.e. region/surface/shape and refractive index properties. Region elements are opened before joining to other elements.

Use this menu item in conjunction with Explode to edit elements that you have already created.


Modify -- Element > Explode
Menu: Modify -- Element > Explode

Selecting this menu item will break apart selected region, surface and shape elements into their individual segments. The position of the segments is not changed so no immediate effect is obvious except that the element will no longer refract rays since it is now really a collection of surfaces positioned end to end. All segments become surface elements after exploding.

Use this menu item in conjunction with Join to edit elements that you have already created.


Modify Tape Measure
Menu: Modify -- Tape Measure...

This item starts a dialog box which presents you with a set of options for how the distance measured by the tape measure is displayed.

Distance

Only the length of the tape measure is displayed - units are drawing units.

Polar (Degrees)

The distance and the direction in degrees are displayed, 0 being horizontal and to the right, positively increasing in anti-clockwise direction.

Polar (Radians)

The distance and the direction in radians are displayed. Angles measured as for the previous option.

Cartesian

The x and y displacements of the tape measure are displayed

None

No readout is displayed. You can use this option to "de-clutter" the display or to create "images" by anchoring a tape measure to two ray intersections - this is how the image is created in the file PLNMIRR.RAY. If the Info -- Readouts menu item is used to copy the readouts of selected tape measures which have this option set then they default to cartesian.

You can also change the number of decimal places used for both distance and angle displays using the + and - minus buttons in the decimal places section of the dialog box.

The Use Leader option if checked causes a leader line to be drawn from the middle of the tape measure line to some other point where the tape measure readout will be displayed. Once this option is set, you can drag the leader to the desired position by selecting the tape measure and dragging the drag handle that appears at the end of the leader.


Modify Protractor
Menu: Modify -- Protractor...

This item starts a dialog box which presents you with a set of options for how the angle measured by the protractor is displayed.

Degrees

The angle is displayed in degrees , 0 being horizontal and to the right, positively increasing in anti-clockwise direction.

Radians

The angle is displayed in radians. Angles measured as for the previous option.

None

No readout is displayed. You can use this option to "de-clutter" the display. If the Info -- Readouts menu item is used to copy the readouts of protractors with this option selected then they default to degrees.

You can also change the number of decimal places used using the + and - minus buttons in the decimal places section of the dialog box.

The Use Leader option if checked causes a leader line to be drawn from the centre point of the protractor to some other point where the protractor readout will be displayed. Once this option is set, you can drag the leader to the desired position by selecting the protractor and dragging the drag handle that appears at the end of the leader.


Mirror operation
Menu: Modify -- Mirror

This menu item allows you to mirror (reflect or flip - call it what you will) the selected objects about some line. You must select the two end points of the mirror line after which the selected objects are flipped about this line.


Rotate operation
Menu: Modify -- Rotate

This menu item allows you to rotate the selected objects about some point either by some specified angle or by dragging with the mouse.

When this menu is selected a dialog box appears: in the upper part of the dialog box you can enter an angle in degrees and click on the Ok button. You must then select the centre point of the rotation in the ray diagram. Angles are measured positive in an anti-clockwise sense.

In the lower part of the dialog box you can click on the "Rotate by dragging" button. If you choose to do this then you must select two points in the ray diagram. The first is the centre of rotation and the second is a reference point. The selected objects will rotate as the mouse is moved such that the line joining the centre point to the reference point will line up with a line drawn between the centre point and the current mouse position.


Scale operation
Menu: Modify -- Scale

This menu item allows you to scale the selected objects by any factor. You must choose the centre of the scale operation and then enter the scale factor. Negative scale factors are allowed - they produce a rotation by 180 degrees as well as scaling.


Move operation
Menu: Modify -- Move

This menu item allows you to move the selected objects by a precise amount. You must choose two points which define the displacement through which the items will be moved. Try using a relative coords snap to specify the displacement.


Reset Trails
Menu: Modify -- Reset Trails

Selecting this menu item erases all trails. It does not delete them. When you subsequently drag the ray diagram the trails will continue to update from the point where they were reset.


Clear menu
Menu: Clear

Items in this menu delete all objects of a specified type from the ray diagram. You can recover from these actions with Edit -- Undo.

All

Deletes everything. See also File -- New

Rays

Deletes all rays and sources from the ray diagram. Is not affected by the state of the Show xxx Rays options.

Void rays

Deletes all void rays.

Elements

Deletes all regions, surfaces and shapes.

Tape Measures

Deletes all tape measures

Protractors

Deletes all protractors.

Annotations

Deletes all annotations.

Trails

Deletes all trails.


Void rays

A void ray is one which no longer exists but still occupies space in the ray diagram database. A record of such a ray is kept because it (and its child rays) may come into existence again. An example of why this is useful:

Suppose you trace a ray through a prism and then through some subsequent optics, eg. a lens. You then drag the incident ray and at some angle of incidence on the prism the ray is totally internally reflected and no longer emerges to pass through the subsequent optics. When you return the ray to its original angle of incidence you would like the ray to propagate as it did before - through the prism and the subsequent optics. Raytrace therefore does not delete the rays that propagated through the subsequent optics when the ray totally internally reflects - instead it makes them void and you never see them unless the ray again emerges from the prism. When this happens all the void rays come back - along with all the information about their fertility etc.

You may want to delete void rays when you run out of ray space so that more useful rays can be created.


Zoom menu
Menu: Zoom

Raytrace does not limit the size of the ray diagram to the visible window. This menu contains items which allow you to scale and move the window about in the ray diagram. You can also pan the ray diagram by using the scroll bars on the side and bottom of the window.

In

Allows you to specify a rectangular region which will expand to fill the Raytrace window. The action depends on the setting of the Freeze Aspect option (see below).

Out

Allows you to specify a rectangular region which the current window will shrink to. The action depends on the setting of the Freeze Aspect option (see below).

Extents

Adjusts the scale of the diagram so that all visible objects fit within the Raytrace window. Objects that are not visible because of the state of items in the Options menu are not included.

Previous

Reverts to the previous zoom scale if there was one.

Reset

Zooms to the same window as that which Raytrace uses by default when it starts. The aspect ratio is one, the coordinate origin is in the bottom left hand corner of the window and the scale is one drawing unit to one display pixel.

Freeze Aspect

Because ray diagrams can sometimes become very "long and thin", raytrace allows the option of changing the horizontal and vertical scale independently (changing the aspect ratio) so that you can see both vertical and horizontal details of the diagram without panning or zooming.

If Freeze Aspect is not checked then the aspect ratio of the display is adjusted whenever you perform a zoom operation. The Raytrace window will map exactly the rectangular region that you choose with Zoom -- In or Zoom -- Out or the extents of the diagram.

If Freeze Aspect is checked then the aspect ratio remains fixed at its current value and the box you drag is constrained to indicate this aspect ratio. If you zoom with the Freeze Aspect option off then the box you drag is unconstrained, allowing you to change the aspect ratio. The aspect ratio is one when Raytrace starts. If you un-check this option and change the aspect ratio by zooming then re-check this option, the aspect ratio will stay fixed at the new value.


Create menu
Menu: Create

Ray

Element

Source

Tape Measure

Protractor

Annotation

Trail


Create Ray
Menu: Create -- Ray

Select this menu item to begin drawing rays.

The cursor will change to the start point form - position the cursor where you want the ray to start and click once on the primary mouse button or use a snap. The cursor will then change to the end point form and a rubberband with an arrow head will stretch between the selected starting point and the cursor position. Move the cursor to where you want the ray to end and click the primary mouse button again. The ray will then be drawn using the current default settings.

The cursor returns to the start point form and you can continue to draw rays in the same manner. Once you have drawn all the rays you want, click on the secondary mouse button and select Finished from the popup menu that appears. Raytrace will then calculate and display the paths of all resulting rays.

Notes:

*  You do not have to hold the primary mouse button down while dragging to the end point.

*  You do not have to make rays stop exactly on the edge of any elements that you expect them to interact with, Raytrace will lengthen or shorten rays automatically when they interact with elements.

*  If you want to create several rays with different settings then it is probably better not to change the default settings for each one but rather use the Modify -- Rays... to change the rays after you have drawn them.

*  To create a number of rays coming from a common point or parallel rays use the Create -- Source menu item.

*  Use the othro drag mode to create rays whichare either horizontal or vertical.

*  You can use snaps when creating or dragging rays to specify the position relative to parts of the ray diagram but the rays are not linked to the snap points.


Create Element
Menu: Create -- Element

Select this menu item to draw an element.

After selecting this menu item the cursor changes to the start point form. You must select the starting point for the element to be drawn before anything else. The actions you perform next depend upon the type of element you want:

Refracting Region

Draw the shape of the region, remembering that it will be closed automatically. So, for example, it is only necessary to draw two sides of a triangular prism. Click on the secondary mouse button and select Region from the popup. The shape will be closed automatically and filled with the current fill colour.

Note that regions are always closed by the addition of a line segment. You can draw the region as closed manually if you want but you must still tell Raytrace that the element is to be a region otherwise it will treat it as a closed surface.

Reflecting surface

Draw the shape of the surface, click on the secondary mouse button and select Surface from the popup.

Shape

Click on the secondary mouse button and select Shape Only from the popup menu. Draw the shape then click on the secondary mouse button and select Finished from the popup menu.

For help on drawing the shape of an element see : Element segments

Thin lens

Click on the secondary mouse button and select Thin lens F+  (for a converging lens or Thin lens F- for a diverging lens) from the popup menu. The start point selected above is one end of the lens aperture, select the other end of the aperture - the aperture is not drawn at this stage. The cursor now changes to the focus point form. A rubberband stretches from the middle of the lens aperture to the cursor. The length of this rubberband will be the focal length of the lens, the direction is irrelevant. Click on the primary mouse button when you have the desired length. The lens will then be drawn. The principle axis between the focal points is shown by a dashed line. The aperture is shown by a single line with arrowheads at either end. The arrowheads point out for a converging lens and in for a diverging lens. You can change a lens from converging to diverging and vice-versa with the Modify -- Element menu.

Par-axial mirror

You make a par-axial mirror element in the same manner as a thin lens element (see above). When it is drawn a dashed line connects the focal point of the mirror to the middle of the aperture. The aperture is indicated by a single line.

See also: Hints on drawing elements, Overlapping elements


Element hints
Hints on drawing elements

While you can draw elements free-hand, sometimes you will want to create elements either with symmetrical shapes or specific dimensions. For specific dimensions you should use the Abs Coords snap.  For elements with symmetry you should make use of the Copy and Paste facilities in the edit menu and the Mirror, Rotate, Scale, Join facilities in the Modify menu.

For example to create a biconvex lens with the same radius of curvature on both faces:

*  Create a surface consisting of one arc segment with the desired radius.

*  Make a copy of the surface with the Edit -- Copy and Edit -- Paste menu items.

*  Rotate the copied arc 180 degrees using the Modify -- Rotate menu item.

*  Select both the original arc and the rotated copy in that order and use the Modify -- Element > Join menu item.

*  Finally, turn this element into a region using the Modify -- Element > Make Regions.

To create a plano-convex lens, first create a single arc segment surface element and change it to a region. This avoids the problem that Raytrace will only allow you to directly create a region from something with more than one segment. The same thing applies to a region bounded by a single conic segment and its chord.

To delete a segment from an element: explode the element, delete the segment you don't want, select the remaining segments in the order that they should be joined and join them together again. You can insert a segment using the same technique.

Use the Ortho drag mode to create line segments or circular arcs with chords/tangents that are vertical or horizontal.

You can use snaps when creating or dragging elements but the elements will not be linked to the snap points.


Overlapping elements

Raytrace permits elements to overlap. Thus you can have a reflecting surface inside a refracting element or two or more refracting regions overlapping in whole or part. Raytrace resolves the problem of overlapping elements by using "additive" refractive indices. That is, if a point lies within more than one refracting region then the effective refractive index at that point is the sum of the refractive indices of all the elements. This means that you can generate a ray diagram for something like a lens under water so long as you remember that you must subtract out the "background" refractive index of the water when specifying the refractive index of the lens.

There are several other ways in which I could have handled the determination of refractive index at overlaps and later versions of Raytrace may include these as options if there is enough demand.


Element segments

Elements (other than thin lenses and par-axial mirrors) can consist of any number of segments comprising straight lines, circular arcs and conic sections (elliptical, parabolic and hyperbolic arcs). When you first start creating an element Raytrace defaults to straight line segments. You can change to drawing other types of segments as described below.Line segments

To draw straight line segments, click on the secondary mouse buttton and check (select) the item Line Segment in the popup menu. You must specify the end point of the line segment.

Arc segments

To draw arc segments, click on the secondary mouse buttton and check (select) the item Circular Arc in the popup menu. There are a number of methods of specifying an arc. These are outlined below. By default the End/Tangent method is used, you can switch to another method by clicking on the secondary mouse button again. When the popup menu appears the item Circular Arc  should be checked. Selecting this item again brings up another level of popup menu with the various arc drawing method options in it.

End/Tangent

If this item is checked then you must specify an end point and the direction of the tangent to the arc at the start point.

Centre/End

If this item is checked then you must specify a centre point for the arc and an end point. The end point need not lie on the arc. The arc will end where it crosses the line joining the centre and the specified end point. The direction of the arc is specified using the Clockwise arc option.

Radius/End

If this item is checked then you must specify a radius and an end point. The radius is taken as the distance between the start point of the arc and the point you specify when the cursor is in the radius point form. If you specify a radius which is too short to allow the arc to reach the end point then the arc is drawn as a straight line segment - although it retains the ability to be reshaped by dragging.

If either of the last two options is checked then a fourth option specifying the direction of the arc between the start and end points is available:

Clockwise arc

If this is checked then the arc will be drawn in a clockwise sense.

Conic segments

To draw conic segments click on the secondary mouse buttton and check (select) the item Conic Segment in the popup menu. You must select 3 points to define the conic segment.

The focus point. This will be the focus point of the conic section.

The vertex point. This is a point on the axis of the conic section.

The end point. This point defines the direction (relative to the focus) at which the conic segment will end.

It is sometimes hard to visualise what sort of conic you are going to end up with from the position of the start, focus, vertex and end points. If you want a conic with specific constraints then you can apply these after you have drawn some basic approximation. For information on constraining the conic segment in different ways see Conic options.


Conic options

You can adjust a conic segment by dragging the drag handles in the same manner as for arc and line segments. For conics, the four points which are specified over-determine the shape of the segment and one of the points must be adjusted to fit. When creating a conic segment the start, focus and vertex are taken as fixed; the end point you specify only defines a direction relative to the focus not a distance - the end point is moved so that it will lie on the conic segment.

You can change the way Raytrace adjusts the four points (start, focus, vertex and end) to be consistent. To do this, select the element containing the conic segment. Dashed lines are drawn from the start point to the vertex and then from the vertex to the focus. An isolated drag handle appears near the vertex on the opposite side of the conic to the focus drag handle. Click once on this drag handle with the primary mouse button to start the Conic Segment Options dialog box.

There are five options available, click on the radio button beside the one you want.

Focus, End, Axis

The start, focus and end points are used as specified. The vertex defines only the direction of the axis of the conic and will be moved to lie on the conic.

Focus, Vertex, End Angle

The start, focus and vertex points are used as specified. The end point specifies the direction from the focus at which the conic ends. The end point is moved to lie on the conic.

Vertex, Axis, Eccentricity

The start and vertex points are used as specified. In addition the eccentricity is held fixed (see below). The focus point only specifies the direction of the axis relative to the vertex point and the end point only specifies a direction relative to the focus.

Vertex, End, Eccentricity

The start, vertex and end points are used as specified. The eccentricity is held fixed (see below). The focus and axis direction are determined to fit these constraints.

Focus, End, Eccentricity

The start, focus and end points are used as specified. The eccentricity is held fixed (see below). The vertex and axis direction are determined to fit these constraints.

For the last three options you can specify the eccentricity by entering a value in the relevant box.

 An eccentricity of 0 will give a circular arc.

 Values between -1 and +1 (exclusive) will give ellipses. The sign of the eccentricity determines which focus is shown with the drag handle.

A value of 1 will give you a parabola.

A value greater than 1 will give you a hyperbola.

If a value more negative that -1 is entered then it is ignored and the current value is retained. A value of -1 is converted to a value of +1.

Take some care and plan where you put or drag the control points when using parabolas and hyperbolas otherwise you will probably get confused.


Create Source
Menu: Create -- Source

This item brings up a sub menu with two items:

Point

This allows you to create a group of rays that always come from the same point. You specify a number of rays and a centre point followed by an aperture through which the rays will pass. The rays will be drawn in an anti-clockwise direction starting near the first aperture point you select and stopping near the second aperture point you select. The angular spacing of the rays will be even.

Plane

This allows you to create a group of parallel rays. You specify a number of rays, a base point and two aperture points as for a point source. In this case the rays are drawn evenly spaced and parallel to a line joining the base point with the first aperture point.

You can use snaps when creating a source; if you do then the source points will be linked to the snap points.

If you specify the same point for both aperture points then the rays will all be overlayed. This can be useful for generating what looks like a white ray. Rays from sources carry the same attributes as normal rays. They may be modified independently so has to have different colour etc.

Rays emanating from a source may be dragged independently but they will be automatically repositioned when the source is next updated (for example when an object is dragged etc) except as stated below.

You can change the base point of the source by dragging the start of any of the rays emanating from it (and choosing Drag all rays from this source) in the resulting dialog box. You can also change the aperture by dragging the end point of either extreme ray. You can move the entire source by dragging a whole ray emanating from the source. Beware that when you drag the base point or aperture points of a source any links to objects will be lost.

You can delete a source by deleting any one of the rays emanating from it.


Linking to snap points

If you use snap points when creating or dragging sources, tape measures and protractors the points you specify become linked to the snap points.

For example if you specify an end snap when selecting the base point for a source and then drag part of the ray diagram so that the end point moves, the point source will also move. If the snap point is deleted then the linked point will remain where it was when the snap point last existed. If you drag a source point that was created with a snap then the link to the snap point is lost. You can re-establish the link to the same or another snap point simply by specifying a snap when finishing the drag.

Sources can only be linked to snaps that refer to elements.

Tape measures and protractors can be linked to snaps that refer to elements and rays.

Elements and individual rays can not be linked to snaps.


Create Tape Measure
Menu: Create -- Tape Measure

To create a tape measure, select this menu item then select the two end points you want to define the tape measure.

A tape measure is an object which displays the distance between two points in the ray diagram - it is drawn as a straight line with some text over the middle of the line.

Tape measures can be dragged like other objects and can be linked to snaps. You can select a number of options for how the distance is displayed.


Create Protractor
Menu: Create -- Protractor

A protractor is an object which displays the angle subtended by two "end" points relative to a third "centre" point in the ray diagram - lines are drawn joining the centre point to the ends and the angle is displayed near the centre point.

Protractors can be dragged like other objects and can be linked to snaps. You can select a number of options for how the angle is displayed.


Create Annotation
Menu: Create -- Annotation

You can add annotations to your ray diagram using this menu item.

When you  select this menu item a dialog box will appear with space to type in the annotation text. The text must be less than 32 characters long and will appear as a single line of text in the diagram.

Once you have entered the desired text click on Ok. You must then select the base point to which the annotation will be anchored. This may be an snap to an object; if so then the annotation will be dragged along with the object.

After selecting the base point you must specify the leader offset. The annotation will be placed at this point and a leader line will join the text to the base point selected previously. You may select the leader point and the base point as the same, in which case a small dot will appear at the base point.

You can select and drag an annotation as you do other objects.

To change the annotation text first select the annotation. A third drag handle will be displayed near the end of the leader; click on this drag handle to bring up the dialog box for entering the annotation text.


Auto trace
Menu: Modify -- Auto trace

Raytrace allows you to move or drag any point along a pre-defined path. This menuitem allows you to move only a source or ray along a specified path. To drag any point along a path use the Auto drag function.

Moving a point source along a pre-defined path can be useful for generating images of complex objects in a repeatable manner (dragging freehand is not so good).

Select a source (by selecting one or more of the rays coming from the source) or a single ray that doesnot come from a source and also select an element. It is best (but not essential) to choose a "shape" element so that the ray(s) that will be moved do not interact with the element. Choose this menu item. You will be given some options in a dialog box. Choose one of the options and watch Raytrace move the source or ray around the outline of the element. If you have an imaging forming ray diagram then you can attach a trail to the intersection of two rays that form the image and see the shape of the image corresponding to the element outline.

The readouts of any tape measures and protractors will be copied into the clipboard for each point along the outline. Thus you can generate data for say object and image distances for a particular lens and paste the data into a spread sheet for analysis.


Auto drag

Raytrace allows you to move or drag any point along a pre-defined path. You can move a source or ray along a specified path using the Modify -- Auto trace menu item or you can use the auto drag function. To use the auto drag function you must start by dragging the point you want to move manually. Once you have established the dragging you click on the secondary mouse button and select Auto drag from the popup menu. The dragging will be suspended and the cursor will change to the select form. Select any element (preferably a shape) and Raytrace will drag the point along the outline of the element for you. After this manual dragging will resume.

During the automatic dragging the readouts of any tape measures and protractors will be copied into the clipboard for each point along the outline. Thus you can generate data for say object and image distances for a particular lens and paste the data into a spread sheet for analysis.

If you hold the control key down when you select the element along which the dragging will take place the dragging will follow the shape of the element but be offset so as to start from the point where manual dragging left off.


Element
Elements

An element in raytrace is, in general, something with which rays interact. An element can be a closed REGION which can both reflect and refract rays or an open SURFACE which can only reflect. A third type of element called a SHAPE does not interact with rays by reflection or refraction but does interact in the sense that sources can be attached to SHAPES - so when the SHAPE is moved the source also moves. SHAPEs are useful for drawing construction lines and "objects" in the conventional optics sense.

Elements also include "thin lens" and "par-axial spherical mirror" approximations.


Trails

When you drag a ray diagram you get to see where all the interesting points (like images etc) move to. One problem is that the old positions have disappeared and you have to remember what the ray diagram looked like before you dragged it in order to viualise the changes. Trails are a way of overcoming this problem.

A trail is simply a series of line segments that a drawn between the position of a particular "point" (like a ray intersection) in the ray diagram as it is dragged about. You can use trail a to show the image formed of arbitrary object shapes.

See also:  Create -- Trail, Modify -- Reset Trails, Modify -- Pause Trail update, Modify -- Auto trace and Auto drag


Create Trail
Menu: Create -- Trail

When you select this menu item you will be prompted by the cursor to select the point which you want the trail to follow. The point must be an object snap! When the point moves as a result of dragging some part of the ray diagram a trail will be drawn joining the positions occupied by the point as it moves.


Defaults menu
Menu: Defaults

Ray settings...

Child Rays...

Refractive Indices...

Auto drag settings...


Auto drag settings
Menu: Defaults -- Auto drag settings...

Selecting this menu item brings up a dialog box which allows you to set the number of points per segment at which the ray paths are re-calculated during either and auto trace or auto drag function.


Default ray settings
Menu: Defaults -- Ray settings...

Selecting this menu item brings up a dialog box which allows you to set the default colour, arrow position, fertility and length of rays that are to be created by the user. These settings do not apply to rays that Raytrace generates.

The default length setting actually has no effect when the dialog box is started using this menu item.

The affects of the options are explained in the topic: Modify -- Rays...

See also: Defaults -- Child Rays...


Default child ray settings
Menu: Defaults -- Child Rays...

Selecting this menu item brings up a dialog box which allows you to set the default colour, arrow position, fertility and length of rays that are to be created by Raytrace. These settings do not apply to rays that the user draws.

The affects of the options are explained in the topic: Modify -- Rays...

See also: Defaults -- Ray settings...


Default refractive indices
Menu: Defaults -- Refractive Indices...

Selecting this menu item brings up a dialog box which allows you to set the refractive indices for elements that will be created.

Set the values you want either by moving the scroll bars or by entering values directly into the relevant boxes.

Since surface elements and shapes can be turned into regions they have latent refractive indices. These have the value of the defaults at the time they were created.


Options menu
Menu: Options

Colours...

Show >

Grid

Grid size

Snap to grid

Update on Ray Drag

Update on Element Drag

Maximum path depth...

Quiet snap


Show >
Menu: Options -- Show >

Red Rays

Green Rays

Blue Rays

Tape Measures

Protractors

Annotations

Trails


Colours...
Menu: Options -- Colours...

This menu item brings up a dialog box which allows you to set the colours used by Raytrace to draw elements and the background colour. A thumbnail sketch allows you to see the effect of choosing a combination before accepting the settings with Ok or abandoning any selection and sticking with the current colour scheme with Cancel .

The item Par Axials refers to the colour with which the apertures of "Thin lens" and "Par-axial" mirrors are drawn.

Red, green and blue are missing from the colour items because these are reserved for the three ray colours.


Maximum path depth
Menu: Options -- Maximum path depth...

This menu item brings up a dialog box which allows you to control the maximum number of generations of child rays that can spring from any ray. This option is useful for limiting the number of total internal reflections that can occur for example if you start a ray off inside a closed reflector or at greater that a critical angle in a refracting region. The absolute limit on this number is determined by the amount of memory allocated to ray information - at this stage 400 rays regardless of the setting of this option.


Quiet snap
Menu: Options -- Quiet snap

If this menu item is checked then Raytrace will not make sounds to indicate whether or not a snap has been successful.


Show XXX Rays
Menu: Options -- Show > Red (Green or Blue) Rays

These three menu items toggle when selected. They control whether rays of a given colour will be drawn or not. Even when rays are not drawn they are still calculated so that tape measures and protractors which depend upon the rays for position information are updated correctly. The main purpose of these options is to allow you to simplify the ray diagram by hiding rays of which you are not interested in at the time.


Show Tape Measures
Menu: Options -- Show > Tape Measures

This menu item controls whether tape measures are drawn or not. Unchecking the item to turn off tape measures can de-clutter a ray diagram.


Show Trails
Menu: Options -- Show > Trails

This menu item controls whether trails are drawn or not - it does not affect the updating of trails.

See also: Modify -- Pause Trail update


Show Protractors
Menu: Options -- Show > Protractors

This menu item controls whether protractors are drawn or not. Unchecking the item to turn off protractors can de-clutter a ray diagram.


Show Annotations
Menu: Options -- Show > Annotations

This menu item controls whether annotations are drawn or not.


Update on Ray Drag
Menu: Options -- Update on Ray Drag

If this item is checked then Raytrace will "animate" the ray diagram as you drag rays or sources around. If this is slow on your computer then you might like to uncheck this item - in this case Raytrace waits until you finish dragging the rays before it completes the ray paths.

See also: Update on Element Drag


Update on Element Drag
Menu: Options -- Update on Element Drag

If this item is checked then Raytrace will "animate" the ray diagram as you drag elements around. If this is slow on your computer then you might like to uncheck this item - in this case Raytrace waits until you finish dragging the element before it completes the ray paths.

This item also controls whether Raytrace updates the diagram as you change the refractive index of an element or after you have finished changing the refractive index.

See also: Update on Ray Drag


Pause Trails
Menu: Modify -- Pause Trail update

Checking this menu item causes the updating of all trails to be suspended. When the option is subsequently unchecked the trail continues from the new position of the point. Trails can appear as separated segments if this option is used. If you select a trail only the first segment is highlighted by a drag handle.

You can toggle this option simple by pressing the "P" key. So you don't need to stop dragging to generate trails with separate segments.


Info menu
Menu: Info

Identify Point

Physical Length

Optical Length

Readouts


Identify point
Menu: Info -- Identify Point

After selecting this menu item, select a point in the ray diagram (you may use snaps to do so). After selecting the point a message box will appear containing the coordinates of the point as well as the refractive index at that point.

For your convenience, this information is also copied to the clipboard.


Physical Length
Menu: Info -- Physical Length

This menu item causes the physical path length of all selected rays to be summed and displayed in a message box as well as being copied to the clipboard.

See also: Optical Length


Optical Length
Menu: Info -- Optical Length

This menu item causes the optical path length (physical path multiplied by refractive index) of all selected rays to be summed and displayed in a message box as well as being copied to the clipboard.

See also: Physical Length


Copying Readouts
Menu: Info -- Readouts

This menu item causes the readouts of all selected tape measures and protractors to be copied to the clipboard. If the tape measures or protractors have the None option set (see Modify -- Tape Measure then they are treated as if the Cartesian or Degrees options are set.


Primary Mouse Button

The primary mouse button is the one which you use most often in Windows to select from menus etc. It is commonly called the left mouse button. Windows allows you to swap the action of the buttons - useful for left handed people. So to avoid confusion it is referred to as the primary button just to keep the left handers happy.


Secondary Mouse Button

The secondary mouse button is commonly called the right mouse button but Windows allows left-handed people to swap the action of the buttons.


Segment

A segment is a part of an element. Elements can be made up of connected straight line segments, circular arc segments or conic section (parabolic, elliptical or hyperbolic) segments.


Drag Handles

When a ray, element, tape measure or protractor is selected, small square boxes called drag handles are drawn at the vertices and control points of the object. Positioning the "Select" cursor over these boxes and clicking the primary mouse button allows you to drag the vertex or control point to a new position.


Control points

Control points are auxillary points which define the shape of a segment. For example an arc segment requires a start and end point and a direction of the starting tangent, this is supplied by the tangent control point. Conic segments require start, end, vertex and focus points. In addition there is an options control point positioned near the vertex which allows you to change how the conic segment is defined by the position of the four points just mentioned.


Notes on using help

Windows has a reasonably sophisticated help system which allows you to navigate your way around the help information. These are some brief notes on the minimum that you need to know to use Raytrace's help.

If you click on text that appears like this you will jump to a new topic.

If you click on text that looks like this a pop up topic will appear.

You can step through a "browse" sequence of topics by using the browse buttons >> to go to the next topic and << to go back one topic. (Not all topics are part of browse sequences, when this is the case the buttons are dimmed.)

You can search for a topic by keyword by clicking on the Search button.

You can return to the first help topic by clicking on the Contents button.

You can select from a popup list of topics that you have used by clicking on the History button.

For more complete information on using help see: Using Help


Example topic
Topic title

To return to the previous topic click on the Back button.

You can back track like this all the way to where you started if you want.


Example pop up topic
Pop up title

Click in the help window to remove this sort of pop up.


Switching applications
Switching to and from the Raytrace application

As with all Windows applications, you can switch between Raytrace and other applications (such as Help) simply by clicking a mouse button when the cursor is positioned in the window of the application you want. If you have switched away from Raytrace (indicated by the title bar no longer being highlighted) and then click within the Raytrace window, the mouse click that returns you to Raytrace performs no other action; so if nothing happens when you click and you think it should - try clicking a second time.

You are likely to encounter this if you are using Help and switch to the Help window to scroll text or change topics and then want to return to Raytrace.


Using the mouse

The use of the mouse in raytrace is slightly different to many other windows applications. In most applications you need to hold the primary mouse button down while moving the mouse to perform dragging operations etc.

In raytrace there is no need to hold the primary button down while dragging.

Clicking the primary mouse button will begin an operation - for example creating a ray - the mouse can then be moved and the primary button clickeid again to complete the operation.

The cursor in Raytrace generally consists of either a small arrow and a word or a small box and a word. Cursors with an arrow are "point" type cursors, they are a prompt that you are to "point to a point", for example, if you are drawing rays and the cursor consists of an arrow and the word Start then you should point to where you want the ray to start. Cursors with a box are "select" type cursors. You may be selecting an object (ray, element etc) or you may be selecting a point to snap to. Whatever it is that you are trying to select should be positioned so that it passes through or is contained within the box when you click the primary mouse button.

The secondary mouse button is important; it activates a popup menu which allows you to access the various snap types and also options for when you are creating elements. It is also the only pathway to finish some actions such as drawing rays and elements.

When dragging with the mouse you can use two additional modes: Ortho drag mode and Fine drag mode either singly or in combination.


See also: selecting


Child ray

A ray that is produced by Raytrace as a result of the interaction between a ray and an element.


Ortho drag mode

If you hold the control key down while dragging then the drag displacement will be forced to be either horizontal or vertical (whichever passes closest to the cursor position) relative to the point where the primary mouse button was last clicked.

See also: Fine drag mode


Fine drag mode

If you hold the shift key down while dragging then the drag displacement (measured from the point where the shift key was pressed) is reduced by a factor of ten to allow fine dragging.

See also: Ortho drag mode


Parent ray

If a ray (1) produces another ray (2) as a result of an interaction with an element then (1) is called the parent of (2).


Drawn ray

A ray that was originally drawn by the user as distinct from one which was generated by Raytrace.


Tape Measure

An object that displays the distance between two points in a ray diagram.


Protractor

An object that measures an angle in a ray diagram.


Drawn ray

A ray that was originally drawn by the user as distinct from one which was generated by Raytrace.


White ray

Rays in Raytrace are always one of the three colours: red, green or blue. If you want to simulate a white ray, for example, to show dispersion through a prism then you can mimic this by overlaying three rays each with difference colour. The best way to do this is to create a point (or plane) source with three rays and specify the same point for each of the source aperture points. Then select the three rays (all three will be selected at the same time) and change their colours using the Modify -- Ray... menu.


List of .RAY Files
List of supplied .RAY files

A number of ray diagrams are shipped with Raytrace. You will find these useful both as a basis for your own ray diagrams and as an illustration of the capabilities of Raytrace. Many of the diagrams follow the sort of ray diagram that you find in text books etc.

You can load these files using the File -- Open menu item.

For a brief description of what each file contains select from the list below:

CIRCARC.RAY

CORNER.RAY

DEPTH1.RAY

DEPTH2.RAY

DISPERSE.RAY

DOUBLET.RAY

ELLIPSE.RAY

MICROSCP.RAY

PARABOLA.RAY

PARAXIAL.RAY

PERISCOP.RAY

PERISCP2.RAY

PLNMIRR.RAY

PPLANES.RAY

RAINBOW1.RAY

RAINBOW2.RAY

SLAB.RAY

TELESCOP.RAY

THINLENS.RAY

THINLNS2.RAY


CIRCARC.RAY
CIRCARC.RAY file description

This diagram shows image formation in a circular arc reflector.

List of files


CORNER.RAY
CORNER.RAY file description

This file shows a right angle corner reflector's property of always returning light in the same direction from which it is incident. Three coloured rays are used to show that the rays are returned "inverted", that is, the ray that was on top returns on the bottom.

Drag the start point of one of the rays (all three rays come from a plane source) and you will see how the paths through the reflector result in the above mentioned property.

List of files


DEPTH1.RAY
DEPTH1.RAY file description

This diagram can be used to examine the apparent depth of an object as a function of the viewing angle and the refractive index of the material.

List of files


DEPTH2.RAY
DEPTH2.RAY file description

This diagram can be used to examine the real depth of an object as a function of the viewing angle and the apparent depth.

List of files


DISPERSE.RAY
DISPERSE.RAY file description

This file shows the dispersion of a single white light ray through a triangular prism. Use it to demonstrate the effect of changing refractive index for different colours, total internal reflection and the effect of prism shape.

The angle of incidence of the ray on the prism and the deviation angle are also shown. Drag the incident ray to find the angle of minimum deviation.

List of files


doublet.RAY
DOUBLET.RAY file description

This diagram shows a cemented doublet lens in which the longitudinal chromatic aberration has been minimised.

List of files


ELLIPSE.RAY
ELLIPSE.RAY file description

This ray diagram illustrates the property of an elliptical refracting surface with refractive index equal to the reciprocal of the eccentricity - that is that light rays parallel to the major axis are focussed to a point without aberration.

List of files


MICROSCP.RAY
MICROSCP.RAY file description

This file contains a basic microscope ray diagram based on thin lens approximations. A point source on the right is focused to a real image by the objective lens. The eye piece lens then produces a virtual image of this at some distance; usually the distance of most distinct vision. If you drag the point source "object" up and down a small amount you will see the large magnification of the movement of the virtual image. You will also see the effect of moving the object along the microscope axis; small axial displacements of the object lead to very large axial displacements of the virtual image resulting in a very small depth of field.

A tiny shape object has been used to trace out the resulting image. This clearly shows the resulting magnification and also the small depth of field - the narrow object leads to an image with a large axial extent.

List of files


PARABOLA.RAY
PARABOLA.RAY file description

This file contains a parabolic reflector with a point source anchored at its focus. You can drag the shape of the parabola about and show that the exiting light rays are always parallel to the parabola axis. You can also move the point source away from the focus and see what effect this has on the beam.

List of files


PARAXIAL.RAY
PARAXIAL.RAY file description

This diagram compares the properties of an "idealised" circular reflector with a real circular reflector. The focal surfaces on the two reflectors have been traced out.

Use a tape measure object to measure the focal length of the mirror and compare it to the idealised focal length of 100 units.

List of files


PERISCOP.RAY
PERISCOP.RAY file description

This diagram shows the vertical displacement of rays by two parallel plane mirrors. Three different coloured rays are used to show that the image is tranmitted non-inverted.

List of files


PERISCP2.RAY
PERISCP2.RAY file description

In this diagram, rays from a point source are traced through a periscope and the resulting image position located with back-projected rays. Dragging the source around results in the image and object positions being traced out.

List of files


PLNMIRR.RAY
PLNMIRR.RAY file description

This diagram shows the formation of a virtual image in a plane reflecting surface. Drag the source object (on the left of the mirror) around and show that the image is always the same distance aways from the mirror as the point source.

List of files


PPLANES.RAY
PPLANES.RAY file description

This diagram shows the principal "planes"/surfaces of a thick lens.

List of files


RAINBOW1.RAY
RAINBOW1.RAY file description

This diagram shows the dispersion of parallel light rays of different colours by a sperhical water drop into the characteristic bands seen in a rainbow. Note that the blue light is deflected by a greater total angle and the final angle between the incoming and outgoing blue light is less than for red light. This smaller angle means that the blue light appears on the inner edge of the rainbow (smaller angular diameter). Alternatively, for the red, green and blue light to enter your eye the different colours must have come from drops at different elevation angles, the red from higher in the sky etc.

List of files


RAINBOW2.RAY
RAINBOW2.RAY file description

This file contains a circular refracting element that represents the cross section through a spherical drop of water. A ray enters from the right and is internally reflected exiting the drop after one and two internal reflections. This is the geometry which gives rise to the two rainbows in the sky. Drag the entering ray up and down (use the fine drag option by holding down the shift key for better control). The rainbows are formed when the first exiting ray passes through a maximum in deflection angle and when the second exiting ray passes through a minimum in deflection angle.

Change the ray colour and find the difference in angle for each colour.

List of files


SLAB.RAY
SLAB.RAY file description

This file contains the ray diagram generated in the first tutorial example from the user's manual. Ray paths through a rectangular slab of refracting material are shown. It can be used to demonstrate the offset caused in the ray path passing through the slab, the effect of changing the thickness and refractive index of the slab, etc.

List of files


TELESCOP.RAY
TELESCOP.RAY file description

This file contains a basic refracting astronomical telescope. Parallel rays from a distant object strike the objective (which has a long focal length). The light is focused onto the lens focal plane. The eye piece produces a virtual image - shown here at some moderate distance. In a real telescope the virtual image is usually produced at an infinite distance by putting the image formed by the objective at the focal plane of the eye piece. Drag the angle at which the plane source strikes the objective and show the angular magnification that is achieved. Two protractors have been used to show the angle of incident light relative to the telescope axis and the angle the virtual image makes with the axis. Move the lenses about and change the focal lengths to see what happens to the magnification. Move the objective and eyepiece further apart and increase the objective focal length to increase the magnification.

When the diagram becomes to long to fit in the window, its a good idea to uncheck the Freeze Aspect menu item so you can fit all the diagram into the window and still see the vertical details.

List of files


THINLENS.RAY
THINLENS.RAY file description

This diagram compares two lenses with the same radii of curvature but different apertures to an idealised "thin lens".

List of files


THINLNS2.RAY
THINLNS2.RAY file description

This shows the image formation in a standard text book thin converging lens. Drag the point source labelled "object" about to locate the image under various circumstances.

List of files


Other ray files
Other .RAY files

You may find that other .RAY files files have been supplied with your copy of Raytrace.

List of files