Ray-boundary intersection

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; otherwise, 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 $n$ parts, and calculates the initial vertical distance $\Delta z_0$, between the ray and the boundary; then, moving progressivel along the ray segment it calculates the product $p = \Delta z_0\Delta z_i$, with $\Delta z_i$ representing the vertical distance between the ray and the boundary at the $i$th step, until a change of sign in $p$ 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 2012-06-21