*The
ray tracing engine* in HaloSim uses exact mathematical
descriptions of cloud ice crystals. A crystal is defined by specifying
all its faces. When starting a simulation, HaloSim reads the constants
defining the planes passing through the faces and their normal vectors
from individual crystal shape files.
*The elevation of the sun*
is then used with data from files on the type of crystal orientation
and axial dispersion. These data together define limits for the
range of angles the crystal can make to the sun and horizon. Then
the simulation starts.
*To trace a ray*, each
angle and position is given a random value within its selected range
and the ray is started on its path towards the virtual crystal.
At the first face encountered the Fresnel reflection and refraction
probabilities are calculated to decide the ray's fate. If it is
reflected its direction is computed and it forms part of the simulation.
If transmitted it is traced onwards through the crystal. Many facets
could internally reflect the ray before it finally emerges again
and the reflection or transmission computation is repeated each
time.
*When
the ray leaves the crystal* its direction is computed
and it contributes to one pixel of the simulation. The number of
rays that reach a pixel determines the local halo brightness. The
ray tracing is repeated for up to several million rays to produce
the simulation. The process is called a Monte-Carlo calculation
after the proceedings in its casino.
*Ray filters*, when activated,
test the interaction of each ray with each crystal face against
user defined selection criteria. Only rays meeting all the criteria
contribute to the simulation. When the ray tracing tool is used,
the history of each ray is stored as it is traced and a summary
of all the faces where it was reflected or refracted is displayed.
*The ray tracing method*
is based on that described by Walter Tape ("Atmospheric Halos",
Antarctic Research Series, Vol. 64, American Geophysical Union,
Washington, 1994) which enlarges the earlier work of Tr�nkle and
Greenler.
*Validation*: we have validated
HaloSim's predictions against real halo displays and other simulations, primarily those of Walter Tape. |