are identified by applying a connected component
labeling algorithm to . This is performed as a
breadth-first traversal in the TS data structure. The
traversal of each connected component starts at an
arbitrary unvisited vertex v of , and visits all
triangles in the vertex-triangle relation encoded in
the TS data structure, and all the wire-edges in the
vertex-wire-edge relation at v. Then, all the vertices
which are bounding such triangles and wire-edges
are considered, and if they are not visited, they are
inserted in a queue Q.
The traversal continues by extracting the first
vertex in the queue and considering it as current
vertex. A connected component is completely
traversed when the queue is empty. By repeating this
traversal process until no unvisited vertex is left, all
the connected components are retrieved.
Wire-webs are connected components formed
only of wire-edges. To detect and count such
components, a traversal similar to the one described
above is performed, but, at each vertex v, only the
incident wire-edges are considered.
The edge-connected components are computed
by considering the sub-mesh ′ obtained from the
original one by eliminating all the wire-webs. The
edge-connected components correspond to
connected components of the dual graph
representing ′. In the dual graph, the nodes
correspond to the triangles of ′ and the arcs to the
edges shared by two or more triangles.
Edge-connected components are extracted from
the TS data structure starting from an arbitrary
triangle t of ′. For each edge e of t, all the triangles
incident at e are extracted, marked as visited and
inserted in a queue Q. Then, the first triangle in Q is
extracted and the traversal is repeated from such
triangle.
An edge-connected component is completely
traversed when Q is empty. By repeating this
traversal process until no unvisited triangle is left, all
the edge-connected components are found.
It can be easily seen that all the above algorithms
have a time complexity which is linear in the size of
the mesh.
6 COMPUTING BETTI
NUMBERS
In this Section, we show how to compute a
topological signature of a 3D object based on its
Betti numbers β
0
, β
1
and β
2
. Recall that β
0
is the
number of connected components, β
1
is the number
of 1-cycles, and β
2
is the number of 2-cycles.
Given a 3D object represented as a triangle-
segment mesh encoded with the TS data structure, β
0
can be computed as the total number of the
connected components, β
2
needs to be computed by
extracting oriented sub-meshes of the edge-
connected components which enclose voids. Finally,
β
1
is obtained from Euler-Poincare’s formula by
computing the number of vertices, edges and
triangles in the mesh. Thus, the main step, here, is to
compute β
2
.
In the following subsections, we first provide
basic definitions and successively we present the
algorithm for computing the number of 2-cycles.
6.1 Oriented and Folded Surfaces
The algorithm for computing the Betti number β
2
of
a triangle-segment mesh is based on the concepts
of triangle sides, oriented surfaces and folded
surfaces.
A triangle t has two triangle sides (with opposite
normals) defined by the two possible orderings of its
vertices. Each triangle side induces an orientation on
each of its edges. In
Figure 5 (a) an example is shown
where the edge connecting vertices a and b has
orientation ab on one triangle side, and ba on
the opposite side. Two triangle sides are adjacent at
their common edge e if one is reachable from the
other by crossing e.
For each edge-connected component in the
mesh, we can extract connected collections of
triangle sides for the triangles in , that we call
oriented surfaces. An oriented surface is a maximal
edge-connected set of triangles sides, such that, for
each pair of triangle sides s′, s′′ in the set sharing an
edge e, s′ is the successor of s′′ according to one
orientation of e, and s′′ is the successor of s′
according to the opposite orientation of e. In other
words, the two triangle sides that belong to two
different triangles, which share a common edge,
induce an opposite orientation on their common
edge (see
Figure 5 (b)).
To clarify the definition of oriented surface, let
us consider the example shown in
Figure 5 (c).
Imagine an ant walking on the upper side of triangle
t (that is T
1
).
It reaches the triangle side U
1
by crossing edge
(a, b). It reaches the opposite side of t (T
2
) by
crossing edge (a, c), because (a, c) is a boundary
edge. An oriented surface is basically the surface
formed by all the triangle sides that are reachable by
a walking ant.
TOPMESH - A Tool for Extracting Topological Information from Non-manifold Objects
25