given scalar field f , all the existing methods extract
critical points of f as a first step of the global proce-
dure. The most common approach to compute criti-
cal points examines, for each vertex p in the TIN, the
neighbors points (sharing with p and edge) and com-
putes the height difference between every point and
p. If all differences are positive (p is lower than its
neighbors), then p is a minumum. If all differences
are negative (p is higher than its neighbors), then p
is a maximum. If the number of sign changes of such
difference, while traversing p’s neighbors in ciclic or-
der, is two, then p is a regular, i.e., non-critical point.
If the number of sign changes is four, then p is a sad-
dle; if it is more than four, then p is a multiple saddle.
This technique is used by almost all the algorithms,
with the exception of (Bajaj and Shikore 1998).
Existing algorithms for extracting an approxima-
tion of a Morse (Morse-Smale) complex can be clas-
sified according to: the input they consider (namely
RSG or TIN), the output they produce (namely an ap-
proximation of a Morse-Smale complex or of a Morse
complex) and the algorithmic technique they choose.
Here, we have classified them into boundary-based or
region-based techniques (Comic et al. 2005).
Boundary-based techniques basically extract an
approximation of the critical net, by computing the
critical points and then tracing the integral lines, start-
ing from saddle points (Bajaj et al. 1998; Schnei-
der 2005; Takahashi et al. 1995; Edelsbrunner et
al. 2001; Bajaj and Shikore 1998; Bremer et al.
2003; Pascucci 2004). Region-based techniques ex-
tract a discrete approximation of the stable and unsta-
ble Morse complexes, by starting from minima and
maxima and letting a region grow until a given con-
dition is reached (Danovaro et al. 2003a; Danovaro
et al. 2003b; Meyer 1994; Vincent and Soille 1991;
Mangan and Whitaker 1999). We included watershed
algorithms in the latter class since they are region-
based in nature.
In Section 5 we present our implementations of
some representative algorithms of the above tech-
niques. All algorithms, with the exception of the
watershed approach, require that the three vertices
of a triangle have distinct heights. This is gener-
ally achieved, when necessary, by perturbation of the
height values.
4 THE STD ALGORITHM
In this section we present our novel algorithm, that
we called STD, for extracting the 2-manifolds (asso-
ciated with the minima) of a stable Morse complex for
a (Morse) function f defined on a TIN. The algorithm
is region-based in nature since it starts from the min-
ima and lets the 2-manifolds of the Morse complex
grow as long as it is possible.
We first describe the algorithm under the assump-
tion that no two vertices of the terrain have the same
height. Successively, we relax this assumption and
show how to deal with flat triangles, and triangles
having one flat edge.
4.1 Basic Version of the Algorithm
The STD algorithm performs three main steps:
1. Classify the vertices of each triangle t in the TIN,
based on their heights.
2. Extract the minima of the function in the TIN.
3. For each minimum p, construct the stable 2-
manifold by iteratively adding triangles to it.
Vertex classification and Extraction of local min-
ima. For each triangle t in the TIN, the highest,
middle, and lowest vertex are labeled as Source (S),
Through (T), and Drain (D), respectively.
By this STD configuration of the vertices we ba-
sically simulate the gradient direction of t in the dis-
crete case. Note that this labelling does not assume
any kind of interpolation (linear or higher-order) on
triangles or edges of the mesh. Edge labelled S-D is
not necessarily the edge of steepest descent. In Figure
2 the steepest descent is at edge labelled T-D.
The local minima identification is very simple:
they are found as those vertices labeled D in all their
incident triangles.
Construction of the stable 2-manifolds. For each
minimum p, the stable 2-manifold γ
p
associated with
p is initialized with all triangles of the TIN which are
incident in p. Successively, an iterative phase starts
in which, at each step, the algorithm decides if a tri-
angle t, externally adjacent to one edge e of the cur-
rent perimeter of γ
p
, can be added to γ
p
. The ratio-
nale for this decision takes the following issues into
account: (i) the choice must reflect the intuition that
water flows from a higher to a lower height, (ii) the
choice must be deterministic, i.e., a triangle t cannot
be included into different 2-manifolds, depending on
the order in which minima are processed.
The algorithm maintains the invariant that, if a tri-
angle t has been included into γ
p
, then the edge of t
labelled T-D is not on the boundary of γ
p
.
4.2 Inclusion of a Triangle
Let e be an edge of the current perimeter of γ
p
, and
t be the triangle externally adjacent to e. The deci-
sion whether to include t into γ
p
or not, is based on
EXTRACTING TERRAIN MORPHOLOGY - A New Algorithm and a Comparative Evaluation
15