Details of the ray tracing and plotting.
This note collects together various items of information on ray tracing (that is, trajectory integration) and plotting.
Information on the rays is available in two stages, as follows:
(1) In the first stage the rays are traced and are shown in real time on the screen, in the 'graphics' box.. At the same time numerical data on the rays appears in the 'information' box and is also put in the output data file. Interpolated points between the ends of the steps are calculated using a polynomial interpolation technique (see below), if requested by the user. The program stores the data on the end points of the steps for later use, but not the data on the interpolated points.
(2) After all the rays have been traced they are reflected in the planes specified by the user and are then redrawn in the graphics box. Interpolated points are again calculated and added, if requested by the user, this time using a faster (and slightly less accurate) cubic spline technique.
The Bulirsch-Stoer integration technique is used. The only accurate ray coordinates that are available in this method are those at the end points of the ray steps. (The integration routine uses many other points to achieve an accurate result, but these points are not necessarily on the ray itself, and so the coordinates are not available.)
In the first stage the values of the ray parameters at the intermediate points are evaluated by a 5-point interpolation using the 2 end points of the present ray step and the 3 previous steps (if these exist), giving a 5 point interpolation. If these interpolated points are asked for they will be calculated one step in arrears. A consequence of this is that the ray information will appear on the screen one step in arrears.
For further information see: