approximating curves via alpha shapes

12

Click here to load reader

Upload: takis-sakkalis

Post on 15-Jun-2016

215 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Approximating Curves via Alpha Shapes

Graphical Models and Image Processing61,165–176 (1999)

Article ID gmip.1999.0496, available online at http://www.idealibrary.com on

Approximating Curves via Alpha Shapes

Takis Sakkalis∗ and Ch. Charitos

Department of Mathematics, Agricultural University of Athens, 75 Iera Odos, Athens, 118 55 Greece

Received March 23, 1998; revised April 29, 1999; accepted May 26, 1999

We present a method of approximating a nonsingular curveC in the plane or inspace with the use ofalpha shapes. The procedure is based on sampling the curveCwith a finite setSand then construct the alpha shape,Sα, of S. Then,Sα is shown to bea piecewise linear curve that isambientlyhomeomorphic to, and within a prescribedtolerance from,C. c© 1999 Academic Press

1. INTRODUCTION

Modern CAD/CAM systems allow users to access specific application programs forperforming tasks, such as displaying objects on a graphic display and finite element meshinganalysis. These programs often rely on approximate representations of the exact definition.It is for this reason that a number of approximation methods have been developed for highorder curves and surfaces. Piecewise linear approximation of 2D and 3D curves plays acrucial role in the discretization of the data for meshing applications. These approximationsshould, first, be within a user specified tolerance and, second, be homeomorphic (withinthe whole space) to the actual curve.

During the last two decades several methods of curve approximation have been proposed;see [3]. Most of these procedures are based on identifying “significant” points on the curve,e.g., points of extreme curvature or points where the tangent is horizontal/perpendicularwith respect to the axis. The recent work by Choet al. [3] deals with the problem ofapproximating a set of mutually nonintersecting simple composite planar and space Beziercurves within a prescribed tolerance using piecewise linear segments and ensuring theexistence of a homeomorphism between the curve and its approximant.

Bernardini and Bajaj, on the other hand, while working on reconstruction problemsproposed a theoretical way ofreconstructinga smooth plane curveC with the aid of alphashapes [2]. In this paper sufficient conditions are given for a sampling setS⊂ C, so thatthe alpha shapeSα, of S, is homeomorphic toC and within toleranceα from C. It is alsoclaimed that the same conditions can be put to work for smooth space curves, even though

∗ Contact Author. E-mail: [email protected].

165

1077-3169/99 $30.00Copyright c© 1999 by Academic Press

All rights of reproduction in any form reserved.

Page 2: Approximating Curves via Alpha Shapes

166 SAKKALIS AND CHARITOS

no formal proof is given. In addition, Amentaet al. [1] and Deyet al. [6], using the notionof nonuniform sampling, reconstruct a smooth closed curveC in the plane and in higherdimensions, by choosing a sufficiently dense sampling set onC.

In approximating a space curve, however, one has not only to be concerned with estab-lishing a homeomorphism between the curveC and its approximantK but, at the sametime, to make sure that the curves are ambiently homeomorphic; i.e., there exists a spacehomeomorphismh : R3→ R3 that carriesC onto K. The reason for the latter is the possiblepresence ofknotsin space curves.

Alpha shapes were introduced by Edelsbrunneret al. in [7] as a geometric tool forconstructing some form of “shape” of an unorganized set of points. In the same paper theconcept of the alpha shape is given a formal mathematical definition and, in addition, analgorithm is presented for the actual construction of these shapes for a given set of pointsS in R3.

In this paper we present a new method for approximating a nonsingular simple curveCwith the use of alpha shapes. The primary motivation for our work is [2], as well as therecent paper by Maekawaet al. [8, Section 2.3] in which an analysis of the concept of pipesurfaces is presented. The key to our procedure is the construction of the (nonsingular)pipe surfacePc(r ) for a convenientr > 0 and the establishment of a sampling setS⊂ C.Then it is shown that the alpha shape ofS is within tolerancer from, and at the same time,ambientlyhomeomorphic toC.

The paper is organized as follows: In Section 2 we present some prior results, as well asTheorem 2.3, that are needed for this work. Section 3 deals with sufficient conditions forsamplingC, while Section 4 presents the construction of the sampling setS. In Section 5we present a few examples, and closing remarks are included in Section 6.

2. PRELIMINARIES

2.1. Simplicial Complexes

A k-simplexσT = conv(T) is the convex hull of an affinely independent setT ⊂ Rn,

|T | = k+ 1; k is called thedimensionof the simplexσT . A simplicial complex Kis a finitecollection of simplices that satisfy:

1. if σT ∈ K thenσU ∈ K ∀U ⊂ T , and2. if σU , σV ∈ K , thenσU∩V = σU ∩ σV .

The underlying space ofK , [K ] is [K ]=∪σ∈Kσ , with the induced topology fromRn. Asubcomplex ofK is a simplicial complexL ⊂ K .

2.2. Alpha Shapes

Let Sbe a finite (nonempty) subset ofR3 and assume that the points ofSare in generalposition. Choose anα ∈ (0,∞] so that the smallest sphere through any 2, 3, or 4 points ofShas a radius different fromα. For 0<α<∞, let anα-ball be an open ball of radiusα. A0-ball is a point, while an∞-ball is an open half space. Anα-ball b is emptyif b∩ S=∅.Let T ⊂ Sof size|T | = k+ 1, 0≤ k≤ 3, and letσT be the simplex which is defined by thesetT . For 0≤ k≤ 2, σT is calledα-exposed if there is an emptyα-ball b with T = ∂b∩ S,where∂b is the sphere or the plane that boundsb. A fixed α thus defines setsFk,α of α-exposedk-simplices for 0≤ k≤ 2. Let nowσT be anα-exposed triangle. We may define the

Page 3: Approximating Curves via Alpha Shapes

APPROXIMATING CURVES VIA ALPHA SHAPES 167

sidesof σT as the two components ofRn−5(T), where5(T) is the plane that containsT .Notice that there are precisely two (not necessarily empty)α-ballsb1 6= b2, so thatT ⊂ ∂b1

andT ⊂ ∂b2. A side ofσT is calledα-exposed if the center ofb1 (or b2) lies in it, andb1

(or b2) is empty. We say thatσT is doubly exposed if both of its sides are exposed, while ifone is exposed and the other is (necessarily) nonexposed we callσT single exposed.

The following definition of the notion of the alpha shape is a modified version of the onegiven in [7]. A two-dimensional analog of this definition is left for the reader.

DEFINITION 2.1. Letα and S be as above. LetK be the simplicial complex that isdefined by the triangles inF2,α, the edges inF1,α and the vertices inF0,α. Let alsoL be thesubcomplex ofK which consists of single exposed triangles. LetU1,U2, . . . ,Um be thebounded components ofR3− [L]. A componentUi is called interior ofL if for each pointx ∈ Ui there is a triangleσT ∈ L such thatx lies in the side ofσT that is notα-exposed.Otherwise,Ui is called exterior ofL. Then, the alpha shape ofS,Sα, is the underlying spaceof K along with the interior components of the subcomplexL.

EXAMPLE 1. Let A= (−1, 0), B= (1, 0), andC= (0,√

3). Let S={A, B,C}, andTbe the convex hull ofS, i.e. the triangle with verticesA, B,C. Then if 0≤α <1 only thevertices ofT areα-exposed. On the other hand, for 1<α<2/

√3 the sides ofT areα-

exposed; in fact, they are doubly exposed. Finally, for 2/√

3<α≤∞, every side ofT issingle exposed. Thus, the alpha shape ofS,Sα, is

Sα =

S ⇔ 0≤ α < 1

The boundary∂T of T ⇔ 1< α < 2/√

3

T ⇔ 2/√

3< α ≤ ∞.

The above is depicted in Fig. 1.

2.3. Pipe Surfaces

In this section we present some results concerning pipe surfaces that are pertinent to thiswork. For a more detailed exposition we refer the reader to [8].

Pipe surfaces were first introduced by Monge [10] and defined as follows: Given a spacecurve C and a positive numberr , the pipe surface withspinecurve C is defined to be

FIG. 1. Three different alpha shapes for the same setS.

Page 4: Approximating Curves via Alpha Shapes

168 SAKKALIS AND CHARITOS

FIG. 2. A pipe surface withr = 0.5 and spine curveC the integral Bezier curve with control points (2,−3, 0),(4, 1.5, 2), (7, 4, 4), (10, 2, 6), and (15, 3, 10).

the envelope of the set of spheres with radiusr which are centered atC; see Fig. 2 foran example. We will denote such a surface byPc(r ). Pipe surfaces have a wide range ofapplications, such as in shape reconstruction, construction of blending surfaces, transitionbetween pipes, robot path planning, and theoretical ones as well.

Suppose that the spine curveC can have a parametric representationC : [0, 1]→ R3 andthatC(t) is simpleand|C′(t)| 6= 0. We can then parametrize the pipe surfacePc(r ) usingthe Frenet trihedron (t(t), n(t), b(t)) [5], as

Pc(r ) = P(t, θ ) = C(t)+ r [cosθn(t)+ sinθb(t)], (1)

wheret ∈ [0, 1] andθ ∈ [0, 2π ]. Notice that [cosθn(t) + sinθb(t)] is a unit circle withcenterC(t) in the normal planeC′(t) · x= 0. By differentiating the above formula withrespect tot andθ we getPt (t, θ ) andPθ (t, θ ) and this will give us the surface normal

Pt × Pθ = −|C′(t)|r [1− κ(t)r cosθ ][cosθn(t)+ sinθb(t)], (2)

whereκ(t) is the curvature ofC(t) att . Observe thatPt×Pθ is parallel toP(t, θ )−C(t) andit becomes zero precisely when 1− κ(t)r cosθ = 0. This is half the information one needsto decide when the pipe surfacePc(r ) is singular. The other half comes from considerationsof “global self-intersection.” More precisely, letκmaxbe the maximum curvature of the spinecurve, and letree, rbb, reb be the maximum possible upper limit radii of the pipe surface,such that it does not globally self-intersect between end circle to end circle, body to body,and end circle to body of the pipe surface. Then, the following theorem gives a necessaryand sufficient condition in terms ofr so that the pipePc(r ) is nonsingular.

THEOREM2.1 [8, p. 6]. Let Pc(r ) be the pipe surface with spine curve C(t) and radiusr. ThenPc(r ) is nonsingular if and only if

r < δ = min{1/κmax, ree, rbb, reb}. (3)

Page 5: Approximating Curves via Alpha Shapes

APPROXIMATING CURVES VIA ALPHA SHAPES 169

Remark 2.1. If we define the interior of the nonsingular pipe surfacePc(r ) which isrepresented as in (1) by:

Int(Pc(r )) = Int(P(t, θ )) = C(t)+ d[cosθn(t)+ sinθb(t)], 0≤ d < r, (4)

we see that

• Each pointx ∈ Int(Pc(r )) ∪ Pc(r ) belongs to auniquedisk

DC(tx) = C(tx)+ d[cosθn(tx)+ sinθb(tx)], 0≤ d ≤ r, (5)

which is perpendicular toC atC(tx), and• In the case whereC is closed,x ∈ Int(Pc(r ))⇔ the (minimum) distance fromx to C

is less thanr .

Even though the above results were proved for pipe surfaces having the parametricrepresentation (1), similar results hold for pipes whose spine curveC is a one-dimensionalcompact manifold without boundary. In fact, Theorem 2.1 takes now the (simpler) form

THEOREM 2.2. Let Pc(r ) be the pipe surface with spine curve C—a one-dimensionalcompact manifold without boundary—and radius r. ThenPc(r ) is nonsingular if and onlyif

r < δ = min{1/κmax, rbb}. (6)

We close this section by proving our first result which will be needed in Section 3.First some terminology. LetM be a connected one-dimensional compact manifold withoutboundary, with a fixed orientation on it. Forx, y ∈ M, x 6= y, we callM(x, y) the uniquecurve that one traces when he moves onM from x to y with respect to the orientation ofM . Obviously,M =M(x, y) ∪ M(y, x) andM(x, y) ∩ M(y, x)={x, y}. Let Br denote a(closed) ball of radiusr , and letB(x, r ) denote a (closed) ball, centered atx of radiusr .Finally, for a ∈ R3, let d(a,M) denote the (minimum) distance froma to M .

THEOREM2.3. Let M ⊂ R3 be a connected compact one-dimensional manifold withoutboundary, and let r> 0 so that the pipePM (r ) is nonsingular. Then

• B(x, r ) ∩ M 6= ∅ ⇔ x belongs to the interior of, or on, the pipePM (r ). If this is thecase,

1. ∂B(x, r ) ∩ M ={p} ⇔ x ∈ PM (r ), and2. ∂B(x, r ) ∩ M ={w, v} ⇔ x belongs to the interior of the pipePM (r ). In that

case, B(x, r ) ∩ M is equal to either M(w, v) or M(v,w), and Int(B(x, r )) ∩ M is eitherInt(M(w, v)) or Int(M(v,w)).

Proof. • Let x ∈ R3 that belongs to the exterior ofPM (r ), and defined(m) := ||x−m||for m ∈ M . Notice thatd(m) 6= 0 and, sinceM is compact,d assumes a minimumδ >0on some pointy of M . Now Remark 2.1 shows thatδ should be greater thanr . Therefore,B(x, r ) ∩ M =∅. Obviously the converse is true due to the compactness ofM . Thus, thefirst assertion of the theorem has been proved.

1. Suppose∂B(x, r ) ∩ M ={p}. Then ||x− p|| = r , and thusx belongs to the circlep+ r [cosθn(p)+ sinθb(p)], which is turn says thatx ∈ PM (r ). Conversely, ifx ∈ PM (r ),andδ= d(x,M), thenδ= r . If this δ is assumed on more than one points, say,y1, y2, thenx would have to be on the two different disksDy1 andDy2, a contradiction to Remark 2.1.

Page 6: Approximating Curves via Alpha Shapes

170 SAKKALIS AND CHARITOS

2. Obviously (from 1.), if∂B(x, r ) ∩ M ={w, v} then x has to be in the interior ofthe pipe. Suppose now thatx ∈ Int(PM (r )). Thend(x,M)= δ < r , and thus the interiorof the ball B(x, r ) contains some part ofM . This shows that the boundary∂B(x, r ) andM have at least two points in common. Suppose now that∂B(x, r ) and M have morethan two points in common, sayw, v, s. Without loss of generality we may assume thatthe curveM(w, v) lies in B(x, r ). Notice thatM and ∂B(x, r ) intersect transversely atbothw andv, for otherwise,x would have to be on the pipePM (r ), a violation of 1. Byconsidering the distance functiond(x, z)=‖x− z‖ for z∈M(w, v), we see that there mustbe a pointy∈ Int(M(w, v)) so that minz∈M(w,v) d(x, z)=‖x− y‖< r , and thus, the diskDy= y+ k[cosθn(y) + sinθb(y)], 0≤ k≤ r , containsx. On the other hand, we see from(1) thatscannot be the only other common point ofM and∂B(x, r ). Thus, there should alsobe another pointt 6= w, v, s that lies onM ∩ ∂B(x, r ). Notice again that∂B(x, r ) andMintersect transversely ats andt , and thus, there must be a partM(s, t) of M (different fromM(w, v)) that also lies inB(x, r ). Finally, an argument similar to the above shows that theremust be a pointy1 ∈ M(s, t) so thatx ∈ Dy1. SinceM is simple,y 6= y1, and thus,x ∈ Dy∩Dy1, which is in contradiction to Remark 2.1. Therefore,∂B(x, r )∩ M ={w, v}, and sinceM and∂B(x, r ) intersect transversely at bothw andv, the rest of the assertion follows.

2.4. Ambient Homeomorphisms

Choet al.[3] have presented a method for approximating a set of mutually nonintersectingsimple space Bezier curves within a prescribed tolerance using a piecewise linear curve.In addition, the existence of a homeomorphism between the curve and its approximant hasbeen ensured. However, the latter does not guarrantee that the curve and its approximant arethe same topological “objects” within the space. The reason for this is the possible presenceof knotsin space curves. As an example, let us consider a simple closed knotted curve0

and the usual circleS1={(x, y, z) | x2+ y2= 1, z= 0}. Then, it is a fact that there exists ahomeomorphismh :0→ S1, between0 andS1, but there is no (space) homeomorphism

f : R3→ R3

that maps0 onto S1. In other words, no matter how hard we try, we cannot untie theknot(s) in0—within the spaceR3—and make0 look exactly like the circleS1, (in termsof homotopy, the spaces{R3−0} and{R3− S1} do not have the same fundamental groups[9, p. 103, Theorem 1]).

The above example shows that if one wants to approximate a space curve with anothercurve and, at the same time, wants to ensure not only that the two curves are homeomorphic,but space homeomorphic, he would then have to resort to the broader notion of space (orambient) homeomorphism.

In this paragraph we apply the idea of the pipe surface to give sufficient conditions so thata given nonsingular space curveC(t) : [0, 1] → R3 and its approximantK (s) are indeedambiently homeomorphic. We achieve that by first takingr > 0 so that the pipe surfacePc(r ) is nonsingular. Then, ifK (s) : [0, 1] → R3 is another curve with the property thatthe following are satisfied:

A. K (s) lies insidePc(r ),B. For everys, the diskDC(s) (see [5]), intersectsK (s) at precisely one point, andC. K (0)=C(0), K (1)=C(1)

Page 7: Approximating Curves via Alpha Shapes

APPROXIMATING CURVES VIA ALPHA SHAPES 171

(roughly speaking, the curveK (s) looksexactlylike the spine curveC(t) insidethe pipesurfacePc(r )) we have

THEOREM 2.4 [8, p. 17]. 1.C(t) and K(s) are ambiently homeomorphic, end pointsfixed; that is, there exists a homeomorphism f: R3 → R3 that maps C(t) onto K(s) andf (C(0))=C(0), f (C(1))=C(1), and

2. K (s) is within tolerance r from C(t).

3. SUFFICIENT CONDITIONS FOR SAMPLING

3.1. Motivation

In [2, p. 5], some theoretical sufficient conditions for sampling a one-dimensional compactmanifold B without boundary (i.e., a nonsingular compact closed curve) in the plane arepresented. The motive behind these conditions is a disk probeDρ of radiusρ that has to beable to move from point to point onS, touching pairs of points in sequence, and withouttouching other points ofS. More precisely, the conditions are:

C1.For any closed diskDρ ⊂ R2 of radiusρ, B∩ Dρ is either (a) empty; (b) a single pointp (then p ∈ ∂Dρ); (c) homeomorphic to a closed 1-ballI , such that Int(Dρ) ∩ B= Int(I ),and

C2. S is a finite subset ofB so that every open disk of radiusρ centered onB containsat least one point ofS.

One can have similar conditions for nonsingular compact closed curves in space, by replac-ing closed (open) disks with closed (open) balls, respectively. In the sequel when referringto these conditions it will be clear when we shall talk about the 2D or the 3D case.

Utilizing the above conditions, we get the following theorem.

THEOREM 3.1 [2, p. 5, Theorem 4.1].If S, B are as above, then the alpha shape of S,Sα, α= ρ (in the terminology of this paper) is homeomorphic to B and the distance

D(Sα, B) = maxw∈Sα

minv∈B||w − v|| < ρ.

Evidently, conditionsC1 andC2, on which the above theorem is based, are not onlypurely theoretical, but at the same time hypothetical. Thus, in order for Theorem 3.1 to havesome practical value it is imperative to find out whether these conditions can actually occurin practice, that is, whether such a positive numberρ that satisfiesC1 can be computed fora given smooth compact plane curveB on the plane, or in space and whetherS exists forthisρ. We shall, in this and in Section 4, see that this is indeed the case.

To gain some insight, let againB be our (plane) curve. Imagine that our disk probeDρ

is sliding (from both sides) onB; i.e., Dρ moves on the plane and at the same time it istangent toB. Then the above motion ofDρ traces a region in the plane, whose boundaryis better known as theoffsetcurve ofB at a distanceρ from B. When the same procedureis done inR3—this time for the space curveB—we get thepipesurfacePB(ρ) with spinecurveB and radiusρ. Notice also that the distance between the alpha shape ofSandB inTheorem 3.1,D(Sα, B), being less thanρ, is equivalent to the fact that the alpha shape,Sα,of the sampling setS lies insidethe pipe surfacePB(ρ). This is precisely the point wherethe notion of pipe surfaces comes into the picture.

Page 8: Approximating Curves via Alpha Shapes

172 SAKKALIS AND CHARITOS

3.2. The Case of Closed Curves

Let nowC be a nonsingular compact closed simple curve inR3. Let r > 0 be such thatthe pipe surfacePc(r ) is nonsingular. LetSbe a finite subset ofC that satisfies

6. Every open ballBr centered onC of radiusr contains at least one point ofS.

We can now state the 3D analog of Theorem 3.1, which is one of the main results of thispaper.

THEOREM3.2. For C, S, r as above, the alpha shapeSr of S isambientlyhomeomorphicto C and

D(Sr ,C) = maxw∈Sr

minv∈C||w − v|| < r.

SinceC is compact, it consists of finitely many componentsCk. EachCk is a compact one-dimensional manifold without boundary. Throughout this discussion we fix an orientationon eachCk. We also denote by [a, b] the line segment that connectsa andb, wherea, b ∈ R3.We first have

LEMMA 3.3. Let C, r be as above. If Br is a closed ball of radius r, then

• either Br ∩ C=∅ or• ∂Br ∩ C={p} (and in that case Br ∩ C={p}), or• ∂Br ∩C={w, v} (and in this case,w, v belong to the same connected component Ci

of C, and Br ∩ Ci is equal to either Ci (w, v) or Ci (v,w). Moreover, Int(Br ) ∩ C is equalto eitherInt(Ci (w, v)) or Int(Ci (v,w))).

Proof. The proof of this lemma follows easily from Theorem 2.3.

Remark 3.1. Notice that the above lemma says that each closed ballBr satisfies conditionC1 onCk.

CLAIM 3.1. There are at least three points of S on Ck.

Proof. The proof of this claim is a direct application of Lemma 3.3.

We are now ready to prove the theorem. We will show first thatSr (Sk) is ambientlyhomeomorphic toCk, whereSk=Ck ∩ S. Let q1,q2, . . . ,qm,m≥ 3, be the points ofSk

and assume that the said ordering of these points defines the fixed orientation ofCk. Theabove points also define the piecewise linear closed curveL = [q1,q2] ∪ [q2,q3] ∪ · · · ∪[qm,q1=qm+1]. Condition6 shows that||qi −qi+1||< 2r , for eachi = 1, 2, . . . ,m, andthus there are precisely twor -balls B1

i andB2i that make [qi−1,qi ] r -exposed. Indeed, ifB

is anr -ball with qi−1,qi ∈ ∂B, then it has been seen thatCk ∩ B=Ck(qi−1,qi ). And sinceqj /∈ Ck(qi−1,qi ) for j 6= i, i − 1, we see thatB is empty. Thus, each segmentLi = [qi−1,qi ]is doubly exposed. It also belongs to the interior of the pipe, sinceLi ,C(qi−1,qi ) ∈ B1

i ∩B2i .

This also shows thatL ∈ Int(Pc(r )).Furthermore, these are the only segments—amongst the ones formed by the points of

Sk—that arer -exposed. Ifm= 3, this is indeed the case. Ifm≥ 4, and [qi ,qj ] is exposed, for|i − j | ≥2, then there would be an empty ballBr whose boundary containsqi ,qj . But fromLemma 3.3 we get that eitherCk∩Br =Ck(qi ,qj ) orCk∩Br =Ck(qj ,qi ), an impossibility,due to the fact thatSk contains more than three points. In addition, the same lemma showsthat no triangle—formed from the points ofS—can ber -exposed.

Page 9: Approximating Curves via Alpha Shapes

APPROXIMATING CURVES VIA ALPHA SHAPES 173

Moreover, no two exposed segmentsLi+1= [qi ,qi+1] and L j+1= [qj ,qj+1] with|i − j | ≥3 can intersect each other, for that would be a violation of the nonsingularityof the pipePc(r ). In addition, if p∈ S∩ Ci , whereCi is a component ofC different thanCk, the segment [qj , p] cannot ber -exposed since this contradicts the third part of Lemma3.3. Therefore, the alpha shape ofSk, Sr (Sk), is indeed the piecewise linear curveL, whichby the above argument is also simple.

Evidently,L satisfies conditionsA, B, andC of Section 2.4, and thus, Theorem 2.4 saysthat the alpha shapeSr (Sk)= L is ambiently homeomorphic toCk.

Finally, when the above procedure is repeated on every componentCi of C, we get thedesired result.

3.3. The Case of Open Curves

In this section we shall be concerned with approximating a (nonclosed) smooth simpleparametric curveC :=C(t) : [0, 1] → R3. Our results are similar to the closed case, andthus, we will state them without proof.

We begin with the sampling requirement. LetC be as above, and letR> 0 be such thatthe pipePc(R) is nonsingular. Definer as

r < δ = min

{R

2,||C(0)− C(1)||

2

}. (7)

Let, finally, Sbe a finite subset ofC that satisfies

61. (a)C(0),C(1) ∈ S, and (b) every open ballUr of radiusr centered at an interiorpoint ofC with C(0),C(1) /∈ Ur , contains some point ofS.

The following theorem is similar in nature to Theorem 3.2.

THEOREM3.4. If C, r are as above and S satisfies61, then the alpha shapeSr of S isambientlyhomeomorphic to C, end points fixed, and

D(Sr ,C) = maxw∈Sr

minv∈C||w − v|| < r.

4. CONSTRUCTING A SAMPLING SET

As it has been seen from the previous section our approximation procedure is based firston identifying a suitabler so that the pipePc(r ) is nonsingular, and second on finding asamplingsetSonC. In this section we will construct a sampling setS for a givenalgebraiccurveC (for obvious reasons we assumeC is not a straight line). We will here work withopen curves only; the construction of a sampling set for a closed curve can be handled in asimilar way.

To do this we will first have to find a suitabler that satisfies the appropriate condition ofeither Theorem 3.2 or Theorem 3.4.

Let thenC :=C(t) : [0, 1] → R3,C(t)= [x(t), y(t), z(t)]T be arational open smoothsimple curve withC′(t) continuous. We first chooseR> 0 so that the pipePc(R) is non-singular. The method for finding such anR is described in detail in [8, Sections 2 and3].

Page 10: Approximating Curves via Alpha Shapes

174 SAKKALIS AND CHARITOS

Having done that, we pick anr that satisfies condition (7). Lett1< t2< · · ·< tk be thelocal maxima of the function|C′(t)|2= x′2+ y′2+ z′2 over (0, 1). To this end, we will parti-tion the interval [0, 1] in such a way that the sampling setSwill be the image of this partitionunderC(t). We shall do that on each individual subinterval [0, t1], [t1, t2], . . . , [tk, 1].

Then letM0= max{|C′(0)|, |C′(t1)|}. Define points 0= s00< s01< s02< · · ·< s0i < · · ·< s0m0 < 1 so that

1. s0i = 2ir /M0 for i = 1, 2, . . . ,m0, and2. m0 is the least index so that 2m0r/M0≤ t1 and 2(m0+ 1)r/M0> t1.

Now let P0={0< s01< s02< · · · < s0i < · · · < s0m0 ≤ t1} be the partition of [0, t1] thatcomes from thes0i , i = 1, . . . ,m0. Notice that the distance between two consecutive pointsof P0 is less than equal to 2r/M0. This shows that the arc length of the curveC(C(s0i ),C(s0,i+1)) is no greater than 2r . Finally, define the set

Q0 ={

q0i = C(s0i ) for i = 0, 1, . . . ,m0, andqm0+1 = C(t1), if

2m0r

M0< t1

}. (8)

By repeating the above procedure to the rest of the segments [t1, t2], . . . , [tk, 1], we getthe setsQ1, . . . , Qk.

DEFINITION 4.1. Define a sampling setSto be the union of the setsQi ; i.e.,S= ∪ki=0 Qi .

Then it is easy to see thatSsatisfies condition61.

Remark 4.1. As we expect from intuition, ifn is a sufficiently large integer, andti = i /n for i = 0, 1, . . . ,n, thenC is ambiently homeomorphic to the piecewise linear curve∪n−1

i=0 [C(ti ),C(ti+1)]. Indeed, the above construction withn= |S| justifies this remark.

5. EXAMPLES

EXAMPLE 2. Let C be the rational Bezier curve of degree 4 defined by the con-trol points (−0.3, 0.8, 0.1), (0.3, 0.15,−0.45), (0, 0, 0.2), (−0.2, 0.1, 0.8), (0.3, 0.8,−0.6)with weights 1, 2, 0.5, 3, 1. The minimum distance between two points ofC is 0.157556.C has a global maximum curvature att = 0.70618 with curvature valueκ = 48.7601.

FIG. 3. A rational Bezier curve of degree 4 with its approximate alpha shape.

Page 11: Approximating Curves via Alpha Shapes

APPROXIMATING CURVES VIA ALPHA SHAPES 175

FIG. 4. A rational Bezier curve of degree 4 with its approximate alpha shape.

Therefore, the pipe surfacePc(R) is nonsingularwhen R< 0.0205. We also find that|C(0)−C(1)| =0.9220. We now taker = 0.01 and this value ofr satisfies (7). Follow-ing the procedure of Section 4.1, we find a sampling setS for C that consists of 182 points.Figure 3 shows the curveC and its approximant alpha shapeSr .

EXAMPLE 3. The spine curveC with control points (−0.3, 0.8, 0.1), (0.24, 0.15,−0.45)(0, 0, 0.2), (−0.24, 0.12, 0.96), and (−2, 0.6, 0) and weights 1, 2, 0.5, 2.5, 1, respectively,has minimum distance 0.0595918. However, withR= 0.0595918/2= 0.0297959, the pipePc(R) does not self-intersect, since the vectorC(1)−C(0.0370295) is not orthogonal tothe spine curve att = 1. C has a global maximum curvature att = 0.761006 with valueκ = 31.272916. Thus, the pipe isnonsingularwhen R< 0.031977. Following again theprocedure of Section 4.1 forr = 0.015, we find that the sampling setS for C consists of141 points. Figure 4 depictsC, as well as its picewise linear approximationSr .

6. CONCLUSION

In this paper we presented a method for approximating a nonsingular space curve usingthe idea of alpha shapes. In the case of an open rational curveC : [0, 1]→ R3, we showed(Remark 4.1) that if one has a fine partition of the domain [0,1], we can get a piecewise linearapproximation ofC which isambientlyhomeomorphic toC without having to compute anysignificant points ofC. The drawback of this is, of course, the amount of points one has touse in the approximation. Notice also that our method can be made to work for curves inany dimension.

In the future, we hope to be able to use similar ideas to approximate surface patches.

ACKNOWLEDGMENTS

The first author was funded for this work, in part, from the Office of Naval Research under Grant N00014-96-1-0857. The authors thank Mr. Guoling Shen for his assistance with the figures of this paper.

REFERENCES

1. N. Amenta, M. Bern, and D. Eppstein, The crust and theβ-skeleton: Combinatorial curve reconstruction,Graph. Models Image Process.60, 1998, 125–135.

2. F. Bernardini and C. Bajaj, Sampling and reconstructing manifolds using alpha-shapes, inProceedings of theNinth Canadian Conference on Computational Geometry, 1997.

3. W. Cho, T. Maekawa, and N. M. Patrikalakis, Topologically reliable approximation of composite Beziercurves,Comput. Aided Geom. Design13(6), 1996, 497–520.

4. J. L. Coolidge,A Treatise on Algebraic Plane Curves, Dover, New York, 1959.

Page 12: Approximating Curves via Alpha Shapes

176 SAKKALIS AND CHARITOS

5. P. M. do Carmo,Differential Geometry of Curves and Surfaces, Prentice–Hall, Englewood Cliffs, NJ, 1976.

6. T. K. Dey and P. Kumar, A simple provable algorithm for curve reconstruction, inProceedings of 10thACM-SIAM Symposium on Discrete Algorithms, 1999, pp. s893–s894.

7. H. Edelsbrunner and E. P. M¨ucke, Three-dimensional alpha shapes,ACM Trans. Graphics13(1), 1994, 43–72.

8. T. Maekawa, N. M. Patrikalakis, T. Sakkalis and G. Yu, Analysis and applications of pipe surfaces,ComputerAided Geometric Design, 15, 1998, 437–458.

9. E. E. Moise,Geometric Topology in Dimensions 2 and 3, Graduate Texts in Mathematics, Springer-Verlag,New York, 1997.

10. G. Monge,Application de l’ Analysea la Geometrie, Bachelier, Paris, 1850.