Top Banner
Computer-Aided Design 41 (2009) 730–738 Contents lists available at ScienceDirect Computer-Aided Design journal homepage: www.elsevier.com/locate/cad Computing handle and tunnel loops with knot linking Tamal K. Dey * , Kuiyu Li, Jian Sun Department of Computer Science and Engineering, The Ohio State University, 2015 Neil Ave, Columbus, OH 43210, USA article info Article history: Received 31 October 2008 Accepted 5 January 2009 Keywords: Shape analysis Topology Loops on surfaces Homology Knot linking abstract Many applications seek to identify features like ‘handles’ and ‘tunnels’ in a shape bordered by a surface, embedded in three dimensions. To this end, we define handle and tunnel loops on surfaces which can help identify these features. We show that a closed surface of genus g always has g handle and g tunnel loops induced by the embedding. For a class of shapes that retract to graphs, we characterize these loops by a linking condition with these graphs. These characterizations lead to algorithms for detection and generation of these loops. We provide an implementation with applications to feature detection and topology simplification to show the effectiveness of the method. Published by Elsevier Ltd 1. Introduction Many applications need to identify features such as ‘handles’ and ‘tunnels’ induced by the embedding of a connected closed surface in three dimensions. Quantitatively, their numbers can be computed from Betti numbers, for which efficient algorithms are known [1]. However, these numbers cannot provide any qualitative information about these features. To this end, we define a class of loops on M, called handle and tunnel loops, that help identifying these features in the shape bounded by M. Intuitively, a loop is a handle if it spans a disk (surface) in the bounded space bordered by M. If one cuts M along such a loop and fills the boundary with that disk, one eliminates a handle. Similarly, a tunnel loop spans a disk (surface) in the unbounded space bordered by M, and its removal eliminates a tunnel. Fig. 1 shows three handle and three tunnel loops on a CAD surface. In this paper, we provide a formal definition of handle and tunnel loops in terms of homology groups, and provide topological analyses that lead to the algorithms for their detection and generation. Our algorithm can be a basis for applications that require one to recognize features such as handles in a shape and tunnels in its complement, or to simplify a shape topologically by eliminating insignificant handles and tunnels [2–6]. Researchers have looked into the problem of computing nontrivial loops on surfaces with various conditions. Vegter and Yap [7] and Dey and Schipper [8] gave linear time algorithms to compute polygonal schema whose removal cuts the surface into a disk. Erickson and Har-Peled [9] showed that computing graphs of * Corresponding author. Tel.: +1 614 292 3563; fax: +1 614 292 2911. E-mail addresses: [email protected] (T.K. Dey), [email protected] (K. Li), [email protected] (J. Sun). shortest length whose removal cut the surface into a disk is NP- hard. Verdière and Lazarus [10] gave an algorithm for computing a system of loops on a surface which is shortest among the homotopy class of a given system. Yin, Jin, and Gu used universal covering spaces [11] to compute shortest cycles in a homotopy class. Erickson and Whittlesey [12] gave a greedy algorithm to compute the shortest system of loops, among all systems of loops, relaxing the homotopy condition. The above works were mainly concerned with computing a set of non trivial loops while optimizing some metric on the surface. Our goal is different. We seek to compute only specific loops that are handles and/or tunnels. One fundamental difference is that the aforementioned works do not take into account the embedding M R 3 whereas handle and tunnel loops become meaningful only for embedded surfaces M R 3 . Moreover, a loop may change its classification if the embedding changes. We formalize the ideas of handle and tunnel loops and provide an existence proof for them. We argue that the notion of handle and tunnel loops loses its intuitive meaning if the surface has a knotted embedding. We define graph retractable surfaces that avoid these knotted embeddings. These are surfaces whose interior and exterior deformation retract to graphs called core graphs. We present algorithms to detect and generate handle and tunnel loops on such surfaces. Specifically, the main contributions of this paper are: Definition and existence. We provide a formal definition of handle and tunnel loops and prove their existence. Detection. We characterize handle and tunnel loops on graph retractable surfaces in terms of their linking with the core graphs. This leads to an algorithm for detecting handle and tunnel loops. Generation. We show that there exists a special class of handle and tunnel loops that link minimally with the core graphs and present an algorithm to compute them. 0010-4485/$ – see front matter. Published by Elsevier Ltd doi:10.1016/j.cad.2009.01.001
9

Computing handle and tunnel loops with knot linking

May 12, 2023

Download

Documents

Richard Samuels
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Computing handle and tunnel loops with knot linking

Computer-Aided Design 41 (2009) 730–738

Contents lists available at ScienceDirect

Computer-Aided Design

journal homepage: www.elsevier.com/locate/cad

Computing handle and tunnel loops with knot linkingTamal K. Dey ∗, Kuiyu Li, Jian SunDepartment of Computer Science and Engineering, The Ohio State University, 2015 Neil Ave, Columbus, OH 43210, USA

a r t i c l e i n f o

Article history:Received 31 October 2008Accepted 5 January 2009

Keywords:Shape analysisTopologyLoops on surfacesHomologyKnot linking

a b s t r a c t

Many applications seek to identify features like ‘handles’ and ‘tunnels’ in a shape bordered by a surface,embedded in three dimensions. To this end, we define handle and tunnel loops on surfaces which canhelp identify these features. We show that a closed surface of genus g always has g handle and g tunnelloops induced by the embedding. For a class of shapes that retract to graphs, we characterize these loopsby a linking condition with these graphs. These characterizations lead to algorithms for detection andgeneration of these loops. We provide an implementation with applications to feature detection andtopology simplification to show the effectiveness of the method.

Published by Elsevier Ltd

1. Introduction

Many applications need to identify features such as ‘handles’and ‘tunnels’ induced by the embedding of a connected closedsurface in three dimensions. Quantitatively, their numbers canbe computed from Betti numbers, for which efficient algorithmsare known [1]. However, these numbers cannot provide anyqualitative information about these features. To this end,we definea class of loops on M , called handle and tunnel loops, that helpidentifying these features in the shape bounded by M . Intuitively,a loop is a handle if it spans a disk (surface) in the boundedspace bordered by M . If one cuts M along such a loop and fillsthe boundary with that disk, one eliminates a handle. Similarly, atunnel loop spans a disk (surface) in the unbounded space borderedby M , and its removal eliminates a tunnel. Fig. 1 shows threehandle and three tunnel loops on a CAD surface. In this paper, weprovide a formal definition of handle and tunnel loops in terms ofhomology groups, and provide topological analyses that lead to thealgorithms for their detection and generation. Our algorithm canbe a basis for applications that require one to recognize featuressuch as handles in a shape and tunnels in its complement, or tosimplify a shape topologically by eliminating insignificant handlesand tunnels [2–6].Researchers have looked into the problem of computing

nontrivial loops on surfaces with various conditions. Vegter andYap [7] and Dey and Schipper [8] gave linear time algorithms tocompute polygonal schema whose removal cuts the surface into adisk. Erickson and Har-Peled [9] showed that computing graphs of

∗ Corresponding author. Tel.: +1 614 292 3563; fax: +1 614 292 2911.E-mail addresses: [email protected] (T.K. Dey),

[email protected] (K. Li), [email protected] (J. Sun).

shortest length whose removal cut the surface into a disk is NP-hard. Verdière and Lazarus [10] gave an algorithm for computinga system of loops on a surface which is shortest among thehomotopy class of a given system. Yin, Jin, and Gu used universalcovering spaces [11] to compute shortest cycles in a homotopyclass. Erickson and Whittlesey [12] gave a greedy algorithm tocompute the shortest system of loops, among all systems of loops,relaxing the homotopy condition.The above works were mainly concerned with computing a set

of non trivial loops while optimizing some metric on the surface.Our goal is different. We seek to compute only specific loops thatare handles and/or tunnels. One fundamental difference is that theaforementioned works do not take into account the embeddingM → R3 whereas handle and tunnel loops become meaningfulonly for embedded surfacesM ⊂ R3. Moreover, a loopmay changeits classification if the embedding changes.We formalize the ideas of handle and tunnel loops and provide

an existence proof for them. We argue that the notion of handleand tunnel loops loses its intuitive meaning if the surface hasa knotted embedding. We define graph retractable surfaces thatavoid these knotted embeddings. These are surfaceswhose interiorand exterior deformation retract to graphs called core graphs. Wepresent algorithms to detect and generate handle and tunnel loopson such surfaces. Specifically, the main contributions of this paperare:Definition and existence. We provide a formal definition of

handle and tunnel loops and prove their existence.Detection. We characterize handle and tunnel loops on graph

retractable surfaces in terms of their linking with the core graphs.This leads to an algorithm for detecting handle and tunnel loops.Generation. We show that there exists a special class of handle

and tunnel loops that link minimally with the core graphs andpresent an algorithm to compute them.

0010-4485/$ – see front matter. Published by Elsevier Ltddoi:10.1016/j.cad.2009.01.001

Page 2: Computing handle and tunnel loops with knot linking

T.K. Dey et al. / Computer-Aided Design 41 (2009) 730–738 731

Fig. 1. Cad gadget: the red loops represent tunnels and the green ones representhandles. (For interpretation of the references to colour in this figure legend, thereader is referred to the web version of this article.)

Implementation. We present an implementation of our algo-rithm which incorporates the geometry of the surface more inti-mately. The results of our implementation show that the methodis effective in practice.Application. We apply our algorithm to the problem of

computing ‘handle’ and ‘tunnel’ features in shapes which canfurther be used for topology simplification. Again, the results showthe effectiveness of the method.

2. Preliminaries

We state some standard concepts from topology. For amore detailed introduction, the interested reader may consultMunkres [13] or Hatcher [14].Let X be any topological space. A singular k-simplex is defined

as a continuous map σ : ∆k → X where ∆k is the standard k-simplex which is the convex hull of {ei}k+1i=1 . Each ei is a vector inRk+1 and its jth component is δij, where δij = 1 if i = j and 0otherwise. A k-chain is a finite linear combination of singular k-simplices. In this paper we assume the coefficient ring to be Z,the set of integers. The set of all k-chains forms a chain groupCk(X) under addition. The boundary operator ∂ of a singular k-simplex σ takes σ to a collection of maps that are the restrictionof σ on the boundary facets of ∆k, which form a (k − 1)-chain.A boundary operator ∂ : Ck(X) → Ck−1(X) can be defined bythe linear extension. A k-chain is called a k-cycle if its boundaryis empty and a k-boundary if it is the boundary of a (k + 1)-chain. A k-boundary must be a k-cycle. Let Zk and Bk denote theset of all k-cycles and k-boundaries respectively. Both Zk and Bk aresubgroups of Ck(X). The k-th homology group of X , denoted Hk(X),is the quotient group Zk/Bk. Since CK (X) is abelian, so is Hk(X). If Xis a simplicial complex, one could define the simplicial homologygroup for X where each k-simplex plays the role of a singular k-simplex. It turns out that these two homology groups are the sameup to isomorphism.In this paper, we are interested in the first homology group

H1(X) which is a set of equivalent classes of loops, definedas continuous maps from circles into X . Each such class calledhomology class can be represented by a loop in X if X is pathconnected. We let [l] denote the homology class represented bya loop l. The topological spaces we consider in this paper are allcompact subspaces of R3. Their first homology groups are freeabelian groups and hence have a basis where every element ofthe group can be written uniquely as a finite linear combinationof elements in the basis. The elements in a basis are also referredto as generators.A topological space X deformation retracts to its subspace A if

there is a continuous map F : X × [0, 1] → X satisfying thefollowing conditions

Fig. 2. The loop on the torus is neither a handle nor a tunnel.

• F(x, 0) = x for any x ∈ X• F(x, 1) ∈ A for any x ∈ X• F(a, t) = a for any a ∈ A and any t ∈ [0, 1].

X andA are of the samehomotopy type ifX deformation retractsto A. We also use the concepts of cohomology, Mayer-Vietorissequences, and others whose excellent expositions can be foundin Hatcher [14].

3. Definition and existence

LetM be a connected, closed (compact and without boundary),and orientable surface. The genus g ofM is the maximum numberof disjoint simple loops whose removal does not disconnect M .Two closed, connected and orientable surfaces are homeomorphicif and only if they have the same genus. To make our argumentsimple, let M sit inside a three sphere S3, which is thecompactification ofR3. Being embedded in S3, the surfaceM has tobe orientable. It separates S3 into two parts. Given an orientationofM , we may designate a connected component, say I , of S3 \M asinside and the other, say O, as outside. Let

I = I ∪M and O = O ∪M.

Notice that both I and O have M on their boundary. As a compactorientable surface in S3, M admits an open tubular neighborhoodin S3, denotedΣ .

Definition 1. A loop on M is a tunnel loop if the homology classcarried by it is trivial in H1(O) and non trivial in H1(I).

Definition 2. A loop on M is a handle loop if the homology classcarried by it is trivial in H1(I) and non trivial in H1(O).

By definition, a set of tunnel loops are disjoint from set of handleloops, namely no loop on M can be both handle and tunnel. Inaddition, a tunnel loop or a handle loop must be non trivial inH1(M). This is because the inclusion map from M to I induces ahomomorphism from H1(M) to H1(I). Similarly the inclusion mapfrom M to O induces a homomorphism from H1(M) to H1(O).Hence a loop on M that represents the trivial element in H1(M)remains representing the trivial element both in H1(I) and H1(O).However, not every non trivial loop onM is either handle or tunnel.For example, the loop shown in Fig. 2 is neither a handle nor atunnel since it is non trivial in both H1(I) and H1(O).It is not immediately obvious if a connected closed surface of

genus g admits g handle and g tunnel loops. In particular, ‘knotted’embedding of surfaces makes it a non trivial fact, as standardsurface classification theorem cannot be applied to derive it.

Theorem 1. For any connected closed surface M ⊂ S3 of genus g,there exist g handle loops {hi}

gi=1 forming a basis for H1(O), and g

Page 3: Computing handle and tunnel loops with knot linking

732 T.K. Dey et al. / Computer-Aided Design 41 (2009) 730–738

Fig. 3. A thickened trefoil: (a) The red loop obtained by projecting the trefoil knoton the surface is not a tunnel. (b) The red loop with three windings is a tunnel. (Forinterpretation of the references to colour in this figure legend, the reader is referredto the web version of this article.)

tunnel loops {ti}gi=1 forming a basis for H1(I). Furthermore, {[hi]}

gi=1

and {[ti]}gi=1 form a basis for H1(M).

Proof. The tubular neighborhoodΣ ofM in S3 satisfies

S3 = (I ∪Σ) ∪ (O ∪Σ) andΣ = (I ∪Σ) ∩ (O ∪Σ).

Since both I∪Σ andO∪Σ are open, we have the followingMayer-Vietors sequence, which is exact.

· · · → H2(S3)α→ H1(Σ)

β→ H1(I ∪Σ)⊕ H1(O ∪Σ)

γ→ H1(S3)→ · · · .

Since both H2(S3) and H1(S3) are trivial, β is an isomorphisminduced by the inclusion map. Since Σ , I ∪ Σ , and O ∪ Σ

deformation retract to M , I, and O respectively, there is anisomorphism from H1(M) to H1(I)⊕ H1(O), which is also inducedby inclusion. It follows that

rank(H1(I))+ rank(H1(O)) = rank(H1(M)) = 2g. (1)

Also, it is known that (Theorem 19 in [15] p. 172)

rank(H1(I)) ≥ g and rank(H1(O)) ≥ g. (2)

Eqs. (1) and (2) force both the ranks of H1(I) and H1(O) equal g .Now one can choose g elements (ci, 0), i = 1, . . . , g , from a basisin H1(I)⊕ H1(O) whose preimage, by the inclusion isomorphism,provides g elements in H1(M). These g elements, by definition, areclasses of g tunnel loops forming abasis ofH1(I). Similar argumentsshow the existence of g handle loops.

4. Graph retractable surface

Although Theorem1 assures the existence of g handle loops andg tunnel loops on all connected closed surfaces in S3, they do notbear intuitivemeaning of handles and tunnels in ‘knotted’ surfaces.Fig. 3 shows such a surface. It is obtained by thickening a trefoilknot, namelyM is the boundary of the product, K ×D, of a trefoil Kand a 2-diskD. The red loop in Fig. 3(a) is obtained by projecting thetrefoil knot on the surface M . In contrary to the natural intuitionthis loop is not a tunnel loop. It is not trivial in H1(O) though itgenerates H1(I). Actually one can derive that its homology class inH1(O) is 3 times the generator (the green loop in Fig. 3(a)), whichexplains why the tunnel loop shown in Fig. 3(b) contains threewindings.We want to avoid such ‘‘knotted’’ surfaces by considering

the property that at least one of the spaces I and O does not

Fig. 4. Surfaces that are not graph retractable : (a) a solid with a knotted tunnel;it does not have the homotopy type of any graph. (b) a knotty cup; both inside andoutside are not homotopy equivalent to any graph.

deformation retract to a graph. For example, take the abovethickened trefoil which can be considered as a knotted torus. Thefundamental group of the complement of K × D in S3 has thepresentation 〈a, b | a2 = b3〉. On the other hand, the fundamentalgroup of any graph is of the form of free product of Z’s. Thesetwo cannot be the same. So O cannot be homotopy equivalent toa graph and hence cannot deformation retract to a graph. Thereis another embedding of the knotted torus where the tunnel isknotted, e.g., a solid with a knotted tunnel, as shown in Fig. 4a.In this case I does not have the same homotopy type as a graph.Fig. 4b is a combination of these two cases where both I and O donot deformation retract to a graph.We consider connected closed surfaces in S3 for which I and

O deformation retract to graphs. We call them graph retractablesurfaces. Since tunnel and handle loops on non graph retractablesurfaces may not have natural meaning as we explained, this is nota serious restriction in practice. A large class of surfaces in practiceare graph retractable.Let I and O denote the two core graphs to which I and O

deformation retract respectively. Both I and O are connected. SinceI andO deformation retract to (I\Σ) and (O\Σ) respectively, wecan assume I and O lie inside (I \Σ) and (O \Σ) respectively.We state two related lemmas here, which are used later in the

proofs.

Lemma 1. Let {`j}nj=1 be a set of loops on a topological space X suchthat {[`j]}nj=1 form a basis for H1(X). Let A be a path connectedsubspace of X and i : A → X be the inclusion map. If the inducedmap i∗ : H1(A) → H1(X) is an isomorphism, there exists a set ofloops {hj}nj=1 in A such that i∗([hj]) = [`j] for 1 ≤ j ≤ n. Hence{[hj]}nj=1 form a basis for H1(A) and if we consider each hj as a loop inX, {[hj]}nj=1 form a basis for H1(X) too.

Proof. Since i∗ is an isomorphism, there exists an element inH1(A),say τ , such that [`j] = i∗(τ ) for each j, 1 ≤ j ≤ n. Since A is pathconnected, there exists a loop, say hj, such that τ = [hj]. The lemmafollows.

Lemma 2. Let X ⊂ S3 be closed. If X deformation retracts to anotherclosed subset A ⊂ S3, then the inclusion map i : S3 \ X → S3 \ Ainduces an isomorphism i∗ : H1(S3 \ X)→ H1(S3 \ A).

Proof. We have

H1(S3 \ X) w H1(X) w H1(A) w H1(S3 \ A)

where H1(X) and H1(A) are the first cohomology groups of X andA respectively. The left and the right isomorphisms follow fromthe Alexander duality. The middle one follows as X deformationretracts to A. In addition, all three isomorphisms are natural withrespect to inclusion. The lemma follows.

Page 4: Computing handle and tunnel loops with knot linking

T.K. Dey et al. / Computer-Aided Design 41 (2009) 730–738 733

Fig. 5. The two types of crossings.

Fig. 6. A graphwith two components. The bold edges and the black nodes form thespanning forest.

5. Graph complement basis through linking

Since we assume both I and O deformation retract to coregraphs, we study the first homology groups of graphs and theircomplements in S3. Consider a knot 1 K ⊂ S3. Since K ishomeomorphic to a circle S1, one can assign an orientation to it.It is known that H1(K) = Z and [K ] is the generator for H1(K).We also know that H1(S3 \ K) = Z. Let J be another knot in S3that is disjoint from K . The union J ∪ K is a link. Consider a regularprojection of link J ∪ K to a plane. Each point at which J crossesunder K locally projects to one of the crossings in Fig. 5. We count+1 for the crossing on the left and −1 for the one on the right.The linking number, denoted by lk(K , J), is defined to be the sumof these crossings, counted as+1 or−1.

Lemma 3 (Rolfsen [16]). The homology class carried by J equals nrfor some generator r of H1(S3 \ K) if and only if lk(K , J) = n.

It follows from the above lemma that if lk(K , J) = ±1, then [J] is agenerator for H1(S3 \ K).Let G be a finite, possibly disconnected, graph in S3. Let T be a

spanning forest of G. Let {ei}ni=1 be the set of edges of G that are notin T . Adding any edge ei to T form a simple loop, Ki, see Fig. 6a. Eachloop Ki is free of self intersections and hence can be considered asa knot. The set of knots {Ki}ni=1 may not be disjoint but generatesH1(G).Let δij denote the Kronecker delta, that is, δij = 1 if i = j and 0

otherwise. Let Ji be a knot disjoint from all Ki’s and lk(Kj, Ji) = δij,see Fig. 6b. It follows from Lemma 3 that [Ji] is a generator ofH1(S3 \ Ki) and is trivial in H1(S3 \ Kj) for j 6= i.

Theorem 2. {[Ji]}ni=1 form a basis for H1(S3\ G).

Proof. Let Li = Ki∪T . By Lemma2, the inclusionmap from S3\Li toS3 \Ki induces an isomorphism betweenH1(S3 \Li) andH1(S3 \Ki).Since Ji avoids G, [Ji] is the generator for S3 \Li but is trivial in S3 \Ljfor any j 6= i.We prove the theorem by induction on n. Let G1 = ∪n−1i=1 Li.

Consider G and T as union and intersection of G1 and Lnrespectively. Then,

S3 \ G = (S3 \ G1) ∩ (S3 \ Ln) andS3 \ T = (S3 \ G1) ∪ (S3 \ Ln).

1 We only consider tame knots.

By induction hypothesis, {[Ji]}n−1i=1 form a basis for H1(S3\ G1)

and are all trivial in H1(S3 \ Ln). Clearly, [Jn] is the generator forH1(S3 \ Ln) and is trivial in H1(S3 \ G1). Hence {[Ji]}ni=1 form a basisforH1(S3\G1)⊕H1(S3\Ln). Consider the followingMayer-Vietorissequence.

· · · → H2(S3 \ T )α→ H1(S3 \ G)

β→ H1(S3 \ G1)⊕ H1(S3 \ Ln)

γ→ H1(S3 \ T )→ · · · .

Since H1(S3 \ T ) = 0 and H2(S3 \ T ) = 0, β is an isomorphism,which is induced by the inclusion map. The theorem follows as{[Ji]}ni=1 form a basis for H1(S

3\ G1)⊕ H1(S3 \ Ln).

The proof of Theorem 2 implies that H1(S3 \ G)i∗w ⊕ni=1 H1(S

3\

Ki), which, with Lemma 3, leads to the following corollary.

Corollary 4. Let ` be a loop in S3 \ G. One has [`] =∑ni=1 ai[Ji] if

and only if lk(`, Ki) = ai for each i where ai is an integer.

6. Minimally linked loops

In this section, we give more constructive statements aboutthe handle and tunnel loops for a graph retractable surface. Thesestatements relate the linking numbers of the loops with thecore graphs to their characterization and existence. Theorem 3characterizes the handle and tunnel loops in terms of linkingnumbers. Theorem 4 provides the existence of a special classof handle and tunnel loops which link minimally with the coregraphs. This leads to an algorithm to compute a set of 2g loopsforming a minimally linked basis for H1(M) where g of them arehandle and the other g are tunnel.Consider the union of two core graphs I ∪ O as a single graph

with two connected components. From the previous discussion,we can compute a set of knots, denoted {Ki}

2gi=1, which generate

H1(I ∪ O). Let {K Ij }gj=1 denote the loops from I and {KO

j }gj=1 denote

the loops from O.

Theorem 3. A loop ` on a graph retractable surface M is a handle ifand only if lk(`, K I

i ) 6= 0 for at least one of KIi ’s and lk(`, K

Oi ) = 0

for all the KOi ’s. A loop ` on M is a tunnel if and only if lk(`, K

Oi ) 6= 0

for at least one of KOi ’s and lk(`, K

Ii ) = 0 for all the K

Ii ’s.

Proof. Recall that Σ denotes a tubular neighborhood of M in S3.We have

H1(O)i∗w H1(S3 \ (I \Σ))

i∗w H1(S3 \ I). (3)

The first isomorphism holds since S3 \ (I\Σ) deformation retractsto O. The second isomorphism follows from Lemma 2 as (I \Σ) deformation retracts to I. In addition, both isomorphisms areinduced by inclusion maps. Symmetrically we have

H1(I)i∗w H1(S3 \ (O \Σ))

i∗w H1(S3 \ O). (4)

By definition, a loop ` on M is a handle one if and only if [`] istrivial in H1(I) and non trivial in H1(O), which means, by Eqs. (3)and (4), it is trivial in H1(S3 \ O) and non trivial in H1(S3 \ I). FromCorollary 4, the homology class of ` in H1(S3 \ O) is trivial if andonly if lk(`, KO

i ) = 0 for each 1 ≤ i ≤ g , and the homology class of` in S3 \ I is non trivial if and only if at least one of lk(`, K I

i ) is nonzero. A similar argument applies to tunnel loops.

Next, we prove the existence of a set of 2g loops on M whichlink the core graphs in a minimal sense. We will prove that theseloops generate all the handles and tunnels in Theorem 4.

Definition 3. A loop ` on surface M is minimally linked if∑2gj=1 |lk(`, Kj)| = 1.

Page 5: Computing handle and tunnel loops with knot linking

734 T.K. Dey et al. / Computer-Aided Design 41 (2009) 730–738

Intuitively, minimal linking forbids the loops to wind aroundthe surface multiple times, thereby producing more meaningfulhandle and tunnel loops.

Lemma 5. There exists a minimally linked set of loops {Ji}2gi=1 on a

graph retractable surface M where {[Ji]}2gi=1 form a basis for H1(M).

Proof. It is obvious that there exists a set of loops in S3 \ (I ∪ O),denoted {`i}

2gi=1, such that |lk(`i, Kj)| = δij for any 1 ≤ i, j ≤ 2g . For

example, `i can be chosen arbitrarily close to Ki to loop around itonce and avoid linking any otherKj, j 6= i. FromTheorem2, {[`i]}ni=1form a basis for H1(S3 \ (I ∪ O)). We have

H1(M)i∗w H1(Σ)

i∗w H1(S3 \ (I ∪ O)). (5)

The first isomorphism holds, sinceΣ is a tubular neighborhood ofM . The second isomorphism follows from Lemma 2 as (I\Σ)∪(O\Σ) deformation retracts to I ∪ O. In addition, both isomorphismsare induced by inclusion maps. From Lemma 1, there exists a loopJi on M for 1 ≤ i ≤ n such that [Ji] = [`i]. Hence we have|lk(Ji, Kj)| = |lk(`i, Kj)| = δij. Furthermore {[Ji]}ni=1 form a basisfor H1(M).

We observe that the above lemma holds even if we require Jito pass through a specific point, say p. This is because we assumesurface M is connected and hence path connected. Let Ji be a loopguaranteed by Lemma 5. Let h be the path from p to a point on Ji,and h be the reverse of h. Then the loop ` formed by concatenatingh, Ji and h can be taken as new Ji that passes through p. Furthermore,whenM is a polygonal mesh, one can restrict each Ji to the edges ofM . This is becausewe canperforma finite sequence of deformation,each ofwhich iswithin a polygon to deforma Ji in a general positionto the one along the edges, without changing its homology class.The set of loops {Jj}

2gj=1 defined in Lemma 5 can be classified

into two groups: {J Ij }gj=1 with |lk(J

Ij , K

Ij )| = 1 for 1 ≤ j ≤ g , and

{JOj }gj=1 with |lk(J

Oj , K

Oj )| = 1 for 1 ≤ j ≤ g . The homology classes

{[K Ij ]}gj=1, {[J

Ij ]}gj=1, {[K

Oj ]}

gj=1 and {[J

Oj ]}

gj=1 form a basis for H1(I),

H1(S3 \ I), H1(O) and H1(S3 \ O), respectively. Furthermore, dueto Corollary 4 each [J Ij ] is trivial in H1(S

3\ O) and so is each [JOj ] in

H1(S3 \ I). The next theorem formally establishes that there existminimally linked handle and tunnel loops forming a basis for I andO respectively.

Theorem 4. There exists a set of minimally linked handle loops ona graph retractable surface which form a basis for H1(O). Similarly,there is a set of minimally linked tunnel loops which form a basis forH1(I).

Proof. Consider the loops {[J Ij ]}gj=1 and {J

Oj }gj=1. By Eq. (3), {[J

Ij ]}gj=1

form a basis for H1(S3 \ I) and hence for H1(O)while {[JOj ]}

gj=1 are

trivial in H1(S3 \ I) and hence are trivial in H1(O). Symmetrically,by Eq. (4), we have that {[J Ij ]}

gj=1 are trivial in H1(I)while {[J

Oj ]}

gj=1

form a basis for H1(I). The theorem follows from the definitions oftunnel loop and handle loop.

7. Topological algorithms

In this section, we present algorithms to detect and generatehandle and tunnel loops for a graph retractable surface.Assume I and O are given. In a preprocessing step we compute

a set of knots {Ki}2gi=1 from I and O using their spanning trees

as indicated in Section 5. Assuming that I and O have t edgesaltogether, computation of Kis take O(t) time.Detection: Let ` be any given loop with s edges on M . By

Theorem 3, if ` links I and not O, it is a handle loop. If ` links O

and not I, it is a tunnel loop. If none of these conditions holds, ` isneither a handle nor a tunnel. The time complexity of this detectionis dominated by the linking number computation. The linkingnumbers can be determined by computing the intersectionsbetween edges of ` and Kis projected on a plane. It can be donein time O(t + s + x) log(t + s + x) where x is the number of totalintersections.Generation: Here we compute a set of minimally linked g

handle and tunnel loops whose homology classes form a basis forH1(O) andH1(I) respectively. Because ofminimal linking property,the handle and tunnel loops cannot wind around the surfacearbitrarily, a property that goes with the intuitive meaning ofhandles and tunnels. Assume that M has n edges. We use any ofthe O(n) algorithms [8,7] to compute a system of 2g loops on M ,{`i}

2gi=1, through a fixed point p. The homology classes carried by

these loops form a basis for H1(M). For each loop `i, we computethe linking number lk(`i, Kj) for each Kj. Let {Jj}

2gj=1 be the loops

guaranteed by Theorem 4. It follows from Corollary 4 that

[`i] =

2g∑j=1

lk(`i, Kj)[Jj].

Let A be the matrix {lk(`i, Kj)}, EL be the vector [ [`1], · · · , [`2g ] ]t

and EJ be the vector [ [J1], · · · , [J2g ] ]t. We have

EL = A EJ .

Since both {[`i]}2gi=1 and {[Ji]}

2gi=1 are bases forH1(M), A is invertible.

Let A−1 = {aij}. For 1 ≤ i ≤ 2g , Ji can be uniquely expressed as

[Ji] =2g∑j=1

aij[`j].

Observe that [Ji] is some linear combination of [`j]’s with integercoefficients. So the entries in A−1 must be integers.Since all `j’s have the same base point, we can concatenate any

two of them, say `i and `j, into a new loop, denoted `i + `j. Foran integer z, let z`i denote the loop formed by concatenating |z|copies of `i if z > 0 or |z| copies of the reverse of `i if z < 0. Thenwe can take Ji as

∑2gj=1 aij`j for each 1 ≤ i ≤ 2g . From Theorem 3,

we know Ji is a handle loop if Ki is in I or is a tunnel loop if Ki is inO.The time complexity of the generation algorithm is dominated

by the linking number computation and the matrix inversionwhich take O((gn + t + x) log(gn + t + x) + g3) time, since each`i has O(n) edges.

8. Incorporating geometry

In this section, we give an implementation of the algorithm,assuming that M is presented as a piecewise linear surface. Thealgorithm described in Section 7 computes topologically correcthandle and tunnel loops without considering any geometricinformation. Hence the computed loops may not be very goodgeometrically. The implementation presented in this sectionincorporates geometry into the algorithm, namely it computes twosets of loops with small size. Although it does not guarantee thatthe computed set of handle or tunnel loops is the shortest, theexperiments show that they are geometrically meaningful.

8.1. Computing core graphs and {Ki}2gi=1

We use Voronoi diagrams for computing I and O. Let V be theset of vertices inM and Vor V denote the Voronoi diagram of V . LetI and O denote the bounded and unbounded spaces respectively

Page 6: Computing handle and tunnel loops with knot linking

T.K. Dey et al. / Computer-Aided Design 41 (2009) 730–738 735

Fig. 7. The handle loops (green) and the tunnel loops (red) together with I and O.Those edges in O connected to the infinite point are routed to a point outside thebounding boxes of the objects. (For interpretation of the references to colour in thisfigure legend, the reader is referred to the web version of this article.)

Table 1Test machine: Intel Xeon CPU 2.66 GHz; Memory: 4 GB.

Data genus Verts Skeleton Loop

Flower (sparse) 2 2835 4.44 0.009Flower (middle) 2 6226 14.23 0.02Flower (dense) 2 25036 154.14 0.10Double Torus 1 2 3070 3.77 0.02Double Torus 2 2 6985 22.36 0.09Cad gadget 3 13568 43.71 0.15Chair 5 20216 87.72 0.42Casting 9 20392 111.86 0.25Valse 7 21835 114.87 0.65Vase 2 23646 73.45 0.11Tree 18 27405 117.08 0.59Neptune 3 28185 106.73 0.35Pegasus 5 35383 177.26 0.62Hub 33 35898 384.31 18.68Exhaust (sparse) 8 9059 29.99 0.07Exhaust (dense) 8 36262 258.01 0.32Molecule 1 62777 391.54 0.12Buddha 9 64726 414.20 0.60Fusee 18 68718 756.83 2.07Filigree 49 109756 2644.41 14.64Dodecahc 263 171252 9343.33 300.94

we compute each Ji at different places corresponding to theskeleton edges with small geodesic size. As a result, these loopstend to be small. To compute Ji, we consider Ei. Let e be the skeletonedge in Ei having the smallest geodesic size. The edge e is a Voronoiedge. Let p be one of the vertices of the dual Delaunay triangleof e. Use the method proposed by Erickson and Whittlesey [12]to compute a system of loops through p and follow the algorithmstated in Section 7 to obtain Ji. Hence, for each i, 1 ≤ i ≤ 2g , wecompute a Ji with lk(Ji, Kj) = δij. By Theorem 4, we compute a setof g handle loops and g tunnel loops.Erickson and Whittlesey compute 2g loops, one by one, in the

following way. It runs the Dijkstra’s shortest-path algorithm withstarting point p. Whenever the wave front of equidistant verticestouches itself as it sweeps across the surface, a loop is formed bythe two paths from p to the touching point. The algorithm checkswhether this loop is contractible. If not, it continues to propagate

bordered by M as defined earlier. Consider the 2-complex µIformed by the Voronoi facets and its lower dimensional faces thatlie completely in I. Similarly define µO corresponding to O. It isknown that if V samples M densely, µI and µO are geometricallyclose and homotopy equivalent to I and O respectively [17–19].The basic idea to compute I and O is to collapse µI and µO

respectively from their boundaries. A basic collapse operationdeletes a pair of faces, preserving a homotopy equivalence betweenthe spaces before and after the collapse. At the end of all possiblecollapses, we obtain two graphs that are homotopy equivalent to Iand O. These two graphs can be taken as I and O.Although any collapse order is permissible,weuse a specific one

proposed in Dey and Sun [20] for computing the so called curve-skeletons. These curve-skeletons are graphs that reside roughly inthe ‘middle’ of I andO thereby capturing shape geometry better. Areal valued function called medial geodesic defined on the faces ofµI andµO guides the collapse. For each Voronoi facet f , the value isthe shortest geodesic distance onM between the end points of theDelaunay edge dual to f . The Voronoi edges and vertices get a valuewhich is maximal among all values of the Voronoi facets incidentto them. After collapsingµI andµO orderedwith increasingmedialgeodesic values, one obtains the edges of the curve-skeletons. Eachsuch edge gets associated with an additional value called geodesicsizewhich indicates the local size ofM .We use the curve-skeletonsand this additional value to compute handle and tunnel loops ofsmall size.In our implementation, the geodesic distance between two

points on M is approximated by the Dijkstra’s shortest path overthe graph, consisting of the edges ofM . Each skeleton edge on theresulting curve skeletons is a Voronoi edge whose dual Delaunaytriangle has three vertices on surface M . The geodesic pathsbetween each pair of them, together form a ‘circle’, called thegeodesic circle. Its length is the geodesic size associated with thecorresponding skeleton edge, which indicates how big the shape islocally.We obtain I and O by imposing a graph structure on both curve-

skeletons, namely, taking the vertices of degree more than twoas the graph nodes and forming a graph edge by a sequence ofconnected skeleton edges in between two such nodes.There are surfaces for which one cannot compute graphs I

and O by collapsing µI and µO respectively even when bothI and O deformation retract to graphs. As mentioned in [20],one such example can be derived from the famous ‘‘house withtwo rooms’’ [14]. Computing I and O for such pathological casesremains an open question.Define the geodesic size for a graph edge E ∈ I ∪ O as the

smallest geodesic size among the skeleton edges contained in thatgraph edge, i.e.,

g(E) = min{g(e) : e is a skeleton edge in E}

where g(e) is the geodesic size associated with the skeleton edgee. We obtain maximal spanning trees for I and O, which form aspanning forest for I ∪ O. We have g edges left in I and g edgesleft in O. Let {Ei}

2gi=1 denote these edges. As discussed in Section 5,

adding Ei, i = 1, . . . , 2g , back to the spanning forest form a set ofknots Ki, i = 1, . . . , 2g .

8.2. Computing handle and tunnel loops {Ji}2gi=1

All Ji’s computed by the algorithm in Section 7 pass throughan arbitrarily chosen common point. Hence their sizes are usuallynot small. Of course, one can use the algorithm of Lazarusand Verdière [10] to compute a set of shortest loops with thesame homotopy type of the loops computed by the algorithm inSection 7. However, the restriction that they have to pass througha single base pointmake themusually long. In our implementation,

Page 7: Computing handle and tunnel loops with knot linking
Page 8: Computing handle and tunnel loops with knot linking
Page 9: Computing handle and tunnel loops with knot linking