   HALOSIM simulates halo displays.  

      It numerically follows ray-by-ray the refraction and 
      reflection of light through cloud crystals.  

      The simulations are accurate representations of halo 
      displays in the sky.   

   Atmospheric ice crystals, usually in cirrus clouds, create 
   halo displays by refracting and reflecting sunlight.   

      Ice crystals are usually varieties of hexagonal prisms 
      ranging in shape from thin plates to long columns.  When 
      they fall through clouds with near random orientations 
      they can produce circular halos - the most common is 
      22 degrees in radius.

      Plate shaped crystals tend to fall with their large 
      hexagonal faces nearly horizontal.  Their well known 
      halos are parhelia or Sun Dogs - bright prismatic 
      displays either side of the sun.

      Long hexagonal prisms usually fall with their long axes 
      horizontal forming a whole variety of displays from the
      common tangent arcs to rare arcs. 

      Variety of crystal shape (habit) and preferred orientat-
      ion are the keys to the diversity of atmospheric halo 
      displays.  

   
   FEATURES

   *   Cloud crystals exactly represented.   Hexagonal 
       ice crystal habit is variable from thin plates to 
       long prisms.    

   *   Halos from rare pyramidal ice crystals simulated and
       custom pyramidal crystals are easily generated.
       
   *   Crystal orientations selectable. Angular variation from 
       the mean position and its distribution (Gaussian, 
       Top Hat or Simple Harmonic) is adjustable.  An automatic
       crystal orientation file maker is included.

   *   All the possible halos created by crystal - orientation 
       combinations are computed.    

   *   Complex halo displays from multiple crystal habits and 
       orientations simulated.  HALOSIM simultaneously computes 
       up to twelve crystal-orientation combinations.

   *   Ray filters select specific ray paths and display 
       resulting halos either on a full or a split screen. The
       latter allows comparison with an unfiltered display.

   *   Ray tracer displays, for a selected halo or sky region,
       paths taken by rays through crystals.  In combination 
       with ray filters this reveals the mechanism of formation
       of individual halos.

   *   Movable scale provides angular measurements.

   *   High resolution displays from sun centered or user 
       selected directions.   Choice of fish-eye, plane or 
       camera views.

   *   Zoom displays - zoom positions are storable.

   *   Display graphics choice from traditional 'black dots' 
       to high definition full color simulations on user 
       selected backgrounds.

   *   Sky backgrounds and line colours user adjustable.
       
   *   Simulation parameters can be stored and recalled to
       re-play simulations.   Descriptions can be stored with
       the parameters.

   *   Simulations may be stored as image files.


   
   HALOSIM traces light rays through a model of the 
   simulated crystal. 

   All possible light paths through crystals are sampled, 
   hence all possible halos for a given solar altitude and 
   crystal type/alignment combination are simulated. 

   The plane equation constants and unit normal vectors for 
   each crystal facet plane is stored in a crystal 'shape' 
   file.   Accuracy of facet data is important otherwise 
   spurious halos can result.   
 
   Possible crystal orientations with respect to a horizontal 
   plane, and hence the sun, are also defined at the 
   simulation start in an 'orientation' file.   

   The specific orientation of each test crystal is decided 
   by Monte-Carlo selection from within the angular ranges 
   allowed by the orientation file.   The impact position of 
   a starting ray on the crystal is similarly decided by 
   Monte-Carlo selection.
   
   Each ray path is then traced through the crystal. At each 
   intercepted face, the Fresnel reflection and transmission 
   probabilities for the ray are calculated and compared to 
   a random number to determine whether the ray is reflected 
   or transmitted. This process is continued until the ray 
   leaves the crystal or until a re-specified number of 
   facet inter-actions are exceeded.  Rays which successfully 
   leave the crystal are plotted on the screen if they would 
   be visible.  The process is repeated for from 10,000 to 
   several million rays to build up the simulation. 

   The ray tracing method is based on that described by 
   Walter Tape ("Atmospheric Halos", Antarctic Research 
   Series, Vol. 64, American Geophysical Union, Washington, 
   1994) and derives from the earlier work of Trnkle and 
   Greenler.

   HALOSIM has been extensively validated against other 
   simulation programs and halo display photographs.

