As TRACEO calculates progressively ray coordinates it interpolates the altimetry and the bathymetry
at each ray range.
It also checks if the range is inside an object ``box'', i.e.,
if ray range is within the range interval,
which defines a given object;
if the range is outside the object is ignored;
an additional test is performed to test if the ray is inside the object.
If ray depth is above the altimetry,
below the bathymetry,
or inside the object,
TRACEO divides the interval between the initial and final positions into parts,
and calculates the initial vertical distance ,
between the ray and the boundary;
moving progressivel along the ray segment it calculates the product
with representing the vertical distance between the ray and the boundary at the th step,
until a change of sign in is detected.
At such stage the calculation is interrupted,
and the intersection is calculated through linear interpolation between the last two points.
By proceeding in this way TRACEO is able to handle situations,
in which the ray segment can intersect the boundary at more than one point.
Orlando Camargo Rodríguez