TRIRAY - dynamic RAY tracing for a TRIangulated sloth model       

  triray <modelfile >rayends [optional parameters]               

 Optional Parameters:                                      
 xs=(max-min)/2 x coordinate of source (default is halfway across model)
 zs=min     z coordinate of source (default is at top of model) 
 nangle=101 number of takeoff angles                       
 fangle=-45 first takeoff angle (in degrees)               
 langle=45  last takeoff angle (in degrees)                      
 rayfile=   file of ray x,z coordinates of ray-edge intersections
 nxz=101    number of (x,z) in optional rayfile (see notes below)
 wavefile=  file of ray x,z coordinates uniformly sampled in time
 nt=101     number of (x,z) in optional wavefile (see notes below)     
 infofile=  ASCII-file to store useful information         
 fresnelfile=  used if you want to plot the fresnel volumes.           
            default is <fresnelfile.bin>                   
 outparfile=      contains parameters for the plotting software.       
            default is <outpar>                            
 krecord=   if specified, only rays incident at interface with index
            krecord are displayed and stored               
 prim=         =1, only single-reflected rays are plotted              
            =0, only direct hits are displayed                   
 ffreq=-1   FresnelVolume frequency                        
 refseq=1,0,0  index of reflector followed by sequence of reflection (1)
            transmission(0) or ray stops(-1).              
            The default rayend is at the model boundary.         
            NOTE:refseq must be defined for each reflector       
 NOTES:                                              
 The rayends file contains ray parameters for the locations at which   
 the rays terminate.                                       

 The rayfile is useful for making plots of ray paths.            
 nxz should be larger than twice the number of triangles intersected   
 by the rays.                                              

 The wavefile is useful for making plots of wavefronts.          
 The time sampling interval in the wavefile is tmax/(nt-1),      
 where tmax is the maximum time for all rays.                    

 The infofile is useful for collecting information along the           
 individual rays. The fresnelfile contains data used to plot           
 the Fresnel volumes. The outparfile stores information used           
 for the plotting software.                                



 AUTHOR:  Dave Hale, Colorado School of Mines, 02/16/91
 MODIFIED:  Andreas Rueger, Colorado School of Mines, 08/12/93
      Modifications include: functions writeFresnel, checkIfSourceIsOnEdge;
            options refseq=, krecord=, prim=, infofile=;
            computation of reflection/transmission losses, attenuation.