7
Computer-Aided Design 43 (2011) 1011–1017 Contents lists available at ScienceDirect Computer-Aided Design journal homepage: www.elsevier.com/locate/cad Curvature continuous offset approximation based on circle approximation using quadratic Bézier biarcs Young Joon Ahn a,, Christoph Hoffmann b , Yeon Soo Kim c a Department of Mathematics Education, Chosun University, Gwangju, 501–759, South Korea b Department of Computer Science, Purdue University, West Lafayette, IN 47907, USA c Department of Mathematics, Ajou University, Suwon, 442–749, South Korea article info Article history: Received 6 June 2010 Accepted 12 April 2011 Keywords: Offset curve Hausdorff distance Convolution curve Curvature continuous interpolation Circle approximation Quadratic Bézier biarcs abstract We present a method for G 2 end-point interpolation of offset curves using rational Bézier curves. The method is based on a G 2 end-point interpolation of circular arcs using quadratic Bézier biarcs. We also prove the invariance of the Hausdorff distance between two compatible curves under convolution. Using this result, we obtain the exact Hausdorff distance between an offset curve and its approximation by our method. We present the approximation algorithm and give numerical examples. © 2011 Elsevier Ltd. All rights reserved. 1. Introduction Offset curves and surfaces are widely used in many application domains, such as milling and layered manufacturing [1]. The offsets of B-spline and NURBS curves are not rational in general; thus, most CAD systems must rely on approximation techniques for constructing and representing offsets [2,3]. In the last 30 years or so, work on spline approximations for offsets, seeking to get smaller approximation errors, has focused on curve and surface fitting [4,5], equi-volumetric offsets [6,7], level set evolution [8], knot removal [9], and/or detecting singular points [10,11]. Also known are two families of curves that have exact rational offsets. One is the family of Pythagorean Hodograph (PH) curves, and the other is the family of linear normal (LN) curves. PH curves were first presented by Farouki [12]. Since then, many approximation methods and properties of the PH curves have been found [13–15] and these have been extended to Pythagorean normal (PN) vector surfaces [16–18]. LN curves have the property that their convolution with NURBS is rational. Quadratic Bézier curves are LN curves. Lee et al. [19] presented an offset approximation based on a quadratic Bézier approximation of circular arcs. Earlier, Lü [20] proved that the offsets of quadratic Bézier curves are rational of degree six using reparametrization. Recently, approximation schemes based on LN Corresponding author. Tel.: +82 62 230 7331; fax: +82 62 232 8122. E-mail address: [email protected] (Y.J. Ahn). curves have been extended to LN surfaces, to approximate offset surfaces [2,21,22]. In this paper, we modify the approximation method of Lee et al. [19]. They presented G 0 and G 1 end-point interpolation methods for offsets. Our method yields a G 2 end-point interpolation and is based on an approximation of circular arcs using quadratic Bézier biarcs. Our approximant is a rational Bézier curve of degree 3d 2 or 5d 4 when the initial curve is a Bézier curve or rational Bézier curve of degree d, respectively. We also prove that the Hausdorff distance between two compatible curves, a term defined later, is invariant under convolution. Using this fact, we obtain the exact Hausdorff distance between offset curves and our approximations of them. We also explain an implementation of our approximation scheme and give some numerical examples. The remainder of this paper is laid out as follows. After some preliminaries have been presented, in Section 2, we give the G 2 end-point interpolation of circular arcs using quadratic Bézier biarcs and derive the Hausdorff distance between two curves. In Section 3, we prove the invariance of Hausdorff distance under convolution and apply it to circle approximation. Then, we explain our algorithm for offset approximation using quadratic Bézier biarcs in Section 4, and present some numerical examples in Section 5. We comment on our approximation method in Section 6. 2. Circle approximation using quadratic Bézier biarcs Let c be a circular arc with angle 2α<π , e.g. c(θ) =[cos(θ), sin(θ)] θ ∈ [−α,α]. (1) 0010-4485/$ – see front matter © 2011 Elsevier Ltd. All rights reserved. doi:10.1016/j.cad.2011.04.005

Curvature continuous offset approximation based on circle approximation using quadratic Bézier biarcs

Embed Size (px)

Citation preview

Page 1: Curvature continuous offset approximation based on circle approximation using quadratic Bézier biarcs

Computer-Aided Design 43 (2011) 1011–1017

Contents lists available at ScienceDirect

Computer-Aided Design

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

Curvature continuous offset approximation based on circle approximation usingquadratic Bézier biarcsYoung Joon Ahn a,∗, Christoph Hoffmann b, Yeon Soo Kim c

a Department of Mathematics Education, Chosun University, Gwangju, 501–759, South Koreab Department of Computer Science, Purdue University, West Lafayette, IN 47907, USAc Department of Mathematics, Ajou University, Suwon, 442–749, South Korea

a r t i c l e i n f o

Article history:Received 6 June 2010Accepted 12 April 2011

Keywords:Offset curveHausdorff distanceConvolution curveCurvature continuous interpolationCircle approximationQuadratic Bézier biarcs

a b s t r a c t

We present a method for G2 end-point interpolation of offset curves using rational Bézier curves. Themethod is based on a G2 end-point interpolation of circular arcs using quadratic Bézier biarcs. We alsoprove the invariance of the Hausdorff distance between two compatible curves under convolution. Usingthis result, we obtain the exact Hausdorff distance between an offset curve and its approximation by ourmethod. We present the approximation algorithm and give numerical examples.

© 2011 Elsevier Ltd. All rights reserved.

1. Introduction

Offset curves and surfaces are widely used in many applicationdomains, such asmilling and layeredmanufacturing [1]. The offsetsof B-spline and NURBS curves are not rational in general; thus,most CAD systems must rely on approximation techniques forconstructing and representing offsets [2,3].

In the last 30 years or so, work on spline approximations foroffsets, seeking to get smaller approximation errors, has focusedon curve and surface fitting [4,5], equi-volumetric offsets [6,7],level set evolution [8], knot removal [9], and/or detecting singularpoints [10,11]. Also known are two families of curves that haveexact rational offsets. One is the family of Pythagorean Hodograph(PH) curves, and the other is the family of linear normal (LN) curves.

PH curves were first presented by Farouki [12]. Since then,many approximation methods and properties of the PH curveshave been found [13–15] and these have been extended toPythagorean normal (PN) vector surfaces [16–18].

LN curves have the property that their convolution with NURBSis rational. Quadratic Bézier curves are LN curves. Lee et al. [19]presented an offset approximation based on a quadratic Bézierapproximation of circular arcs. Earlier, Lü [20] proved that theoffsets of quadratic Bézier curves are rational of degree six usingreparametrization. Recently, approximation schemes based on LN

∗ Corresponding author. Tel.: +82 62 230 7331; fax: +82 62 232 8122.E-mail address: [email protected] (Y.J. Ahn).

0010-4485/$ – see front matter© 2011 Elsevier Ltd. All rights reserved.doi:10.1016/j.cad.2011.04.005

curves have been extended to LN surfaces, to approximate offsetsurfaces [2,21,22].

In this paper, wemodify the approximationmethod of Lee et al.[19]. They presented G0 and G1 end-point interpolation methodsfor offsets. Our method yields a G2 end-point interpolation and isbased on an approximation of circular arcs using quadratic Bézierbiarcs. Our approximant is a rational Bézier curve of degree 3d− 2or 5d− 4 when the initial curve is a Bézier curve or rational Béziercurve of degree d, respectively. We also prove that the Hausdorffdistance between two compatible curves, a term defined later, isinvariant under convolution. Using this fact, we obtain the exactHausdorff distance between offset curves and our approximationsof them.We also explain an implementation of our approximationscheme and give some numerical examples.

The remainder of this paper is laid out as follows. After somepreliminaries have been presented, in Section 2, we give the G2

end-point interpolation of circular arcs using quadratic Bézierbiarcs and derive the Hausdorff distance between two curves. InSection 3, we prove the invariance of Hausdorff distance underconvolution and apply it to circle approximation. Then, we explainour algorithm for offset approximation using quadratic Bézierbiarcs in Section 4, and present some numerical examples inSection 5.We comment on our approximationmethod in Section 6.

2. Circle approximation using quadratic Bézier biarcs

Let c be a circular arc with angle 2α < π , e.g.

c(θ) = [cos(θ), sin(θ)] θ ∈ [−α, α]. (1)

Page 2: Curvature continuous offset approximation based on circle approximation using quadratic Bézier biarcs

1012 Y.J. Ahn et al. / Computer-Aided Design 43 (2011) 1011–1017

Fig. 1. Piecewise quadratic Bézier biarc (blue) with its control polygon (magenta)bi , i = 0, . . . , 4, which is a G2 end-point interpolation of unit circular arc of angle2α.

Fig. 2. m =cos(α)

4 (cos(α)2 + 8 − cos(α)) > 0 iff α < π/2.

A quadratic Bézier biarc ca can be defined as

ca(t) =

2−

i=0

biB2i (t) t ∈ [0, 1]

2−i=0

bi+2B2i (t − 1) t ∈ (1, 2]

where bi, i = 0, . . . , 4 are the control points and B2i (t), i = 0, 1, 2

are the quadratic Bernstein polynomials [23]. Our approximationmethod uses the quadratic Bézier biarc ca with the control pointsb0 = [cos(α),− sin(α)],b1 = (1 − m)[cos(α),− sin(α)] + m[sec(α), 0],b2 = (1 − m)[cos(α), 0] + m[sec(α), 0], (2)b3 = (1 − m)[cos(α), sin(α)] + m[sec(α), 0]b4 = [cos(α), sin(α)],where m is a real number in (0, 1), as shown in Fig. 1. Using thefact [23,24] that the curvature κ(t) of the quadratic Bézier curvewith control points b0, b1, b2 satisfies

κ(0) =area(△b0b1b2)

|1b0|3

, κ(1) =area(△b0b1b2)

|1b1|3

where1bk = bk+1 −bk, we find the quadratic Bézier biarc ca witha choice of m in Eq. (3) which is a G2 end-point interpolant of thecircular arc, as follows.

Proposition 2.1. For each m ∈ (0, 1), the quadratic Bézier biarcca having the control points in Eq. (2) is G2 continuous at t = 1.Moreover, the quadratic Bézier biarc ca with the choice of

m =cos(α)

4(cos(α)2 + 8 − cos(α)) (3)

is a unique G2 end-point interpolation of the circular arc c inEq. (1).

Proof. For each m ∈ (0, 1), the quadratic Bézier biarc ca(t), t ∈

[0, 2] is symmetric with respect to x-axis. Since the three pointsb1, b2 and b3 are collinear, ca(t) is tangent continuous at t = 1.Since the curvature κ(t) of ca(t) satisfies

κ(1−) =area(△b0b1b2)

|1b1|3

= κ(1) =area(△b2b3b4)

|1b2|3

= κ(1+),

so ca(t) is curvature continuous at t = 1. Also, by theorthogonalities

ca′(0) ⊥ [cos(α),− sin(α)], ca′

(2) ⊥ [cos(α), sin(α)],

ca(t) has the same tangent direction with c(θ) at both end-points.Thus, the approximation ca(t) is aG2 end-point interpolation of thecircular arc c(θ) if and only if it satisfies

κ(0) =area(△b0b1b2)

|1b0|3

= 1 =area(△b2b3b4)

|1b3|3

= κ(2), (4)

which is equivalent to

4m4− (1 − m)2 cos4 α = 0.

This quartic equation has two real roots

m =cos(α)

4(±

cos(α)2 + 8 − cos(α)),

and the choice of m in Eq. (3) is the only real root contained in(0, 1), for 0 < α < π/2, as shown in Fig. 2. �

The Hausdorff distance dH(C1, C2) between two curves C1(t),t ∈ [a, b] and C2(s), s ∈ [c, d] is defined [25,26] by

dH(C1, C2) = maxmaxs∈[c,d]

mint∈[a,b]

|C1(t)− C2(s)|,

maxt∈[a,b]

mins∈[c,d]

|C1(t)− C2(s)|.

We get the Hausdorff distance dH(c, ca) as follows.

Proposition 2.2. The Hausdorff distance between c and ca with thechoice of m in Eq. (3) is

dH(c, ca) = 1 − cos(α)+14sin2(α)(cos(α)−

cos2(α)+ 8).

Its approximation order is four.

Proof. Both curves c(θ) and ca(t) are symmetric with respect tox-axis. It is sufficient to find the maximum of the function

ψ(t) = ||ca(t)| − 1| = |

x(t)2 + y(t)2 − 1|

in the half interval [0, 1], where [x(t), y(t)] = ca(t). Note thatψ ′(t) = 0 if and only if

x′(t)x(t)+ y′(t)y(t) = 0.

Since

x′(t)x(t)+ y′(t)y(t) =34sin2(α)(cos(α)4 + 7 cos2(α)

+ 4 − cos(α)(cos(α)2 + 3)cos(α)2 + 8) · t2(t − 1),

ψ(t) has critical points at t = 0, 1, and so it reaches the maximumat t = 1. Thus, we have

dH(c, ca) = ψ(1) = 1 − cos(α)+14sin2(α)(cos(α)

cos2(α)+ 8).

Page 3: Curvature continuous offset approximation based on circle approximation using quadratic Bézier biarcs

Y.J. Ahn et al. / Computer-Aided Design 43 (2011) 1011–1017 1013

Fig. 3. dH (c, ca) = ϵ(α) = 1 − cos(α)+14 sin2(α)(cos(α)−

cos2(α)+ 8).

By series expansion, we obtain

dH(c, ca) =124α4

+ O(α6)

whose approximation order is four. �

The Hausdorff distance dH(c, ca) between the unit circular arc c ofangle 2α and its quadratic Bézier biarc approximation ca with thechoice ofm in Eq. (3) depends only on the angle α. We denote it byϵ(α) and plot it in Fig. 3.

3. Hausdorff distance and convolution

In this section, we prove that the Hausdorff distance of tworegular compatible curves is invariant under convolution with thesame planar curve.

For the regular planar curve C(t) = [x(t), y(t)], t ∈ [a, b],the unit normal vector field is definedbyN(C(t)) = [−y′(t), x′(t)]/x′(t)2 + y′(t)2, and the graph of N(C(t)), t ∈ [a, b], is called the

Gauss map N (C). If two regular planar curves C1(t) and C2(s) havethe same Gauss map, then they are compatible.

If two compatible curves satisfy

C1′(t) ‖ C2

′(s(t)) and ⟨C1′(t), C2

′(s(t))⟩ > 0

for a reparametrization s = s(t), then the convolution curve C1 ∗ C2is defined by

(C1 ∗ C2)(t) = C1(t)+ C2(s(t)),

as illustrated in Fig. 4. For more information about convolutioncurves or Gauss maps, see, e.g., [19,27–30].

Let two regular planar curves b and p be compatible with noinflection point and a range of the Gauss map of less than π . If q

Fig. 5. Convolution curves b ∗ p(u) and b ∗ q(u).

is an end-point interpolation of the planar curve p, and if q and bare compatible, then there are reparametrizations t = t(u) ands = s(u) satisfying

b′(u) ‖ p′(s(u)) ‖ q′(t(u)) (5)

for each u.Let p(u) = p(s(u)) and q(u) = q(t(u)) for each u, and let Lp(u)

and Lq(u) be the tangent lines of p(u) and q(u), respectively. Wehave the convolution curves

(b ∗ p)(u) = b(u)+ p(s(u)) = b(u)+ p(u)(b ∗ q)(u) = b(u)+ q(t(u)) = b(u)+ q(u) (6)

as shown in Fig. 5. Their derivatives are (b∗p)′(u) = b′(u)+ p′(u)and (b ∗ q)′(u) = b′(u)+ q′(u).

Lemma 3.1. Let two regular planar curves b and p be compatiblewith no inflection point and with the norm of the Gauss map less thanπ . If q is an end-point interpolation of the plane curve p, and if q andb are compatible, then for each u

dH(Lp(u), Lq(u)) = dH(Lb∗p(u), Lb∗q(u)).

Proof. For each u, the tangent vectors of (b ∗ p)(u) and (b ∗ q)(u)have the same direction, namely b′(u) + p′(u) and b′(u) + q′(u).Thus, (b ∗ p)′(u) is parallel to (b ∗ q)′(u), and so they are parallelto p′(u) and q′(u) by Eq. (5). Hence,

Lb∗p(u) ‖ Lb∗q(u) ‖ Lp(u) ‖ Lq(u).

Fig. 4. Convolution curve (C1 ∗ C2)(t) of the compatible curves C1(t) and C2(s).

Page 4: Curvature continuous offset approximation based on circle approximation using quadratic Bézier biarcs

1014 Y.J. Ahn et al. / Computer-Aided Design 43 (2011) 1011–1017

By Eq. (6), Lb∗p(u) and Lb∗q(u) are the translated lines of Lp(u) andLq(u), by b(u), as shown in Fig. 6. Hence,

dH(Lp(u), Lq(u)) = dH(Lb∗p(u), Lb∗q(u)). �

Proposition 3.2. If b, p and q satisfy the hypotheses of Lemma 3.1,then

dH(p, q) = maxu

{dH(Lp(u), Lq(u))}.

Proof. For anyu0, Lp(u0) and Lq(u0) are parallel and are the tangentlines of p(u) and q(u) at u = u0, respectively. Since p(u) and q(u)are regular convex and the norms of their Gaussmaps are less thanπ , we have

dH(Lp(u0), Lq(u0)) ≤ max{dH(p(u0), q), dH(p, q(u0))}.

Since dH(p(u0), q) = dH(p(u0), q) and dH(p, q(u0)) = dH(p,q(u0)), we have

max{dH(p(u0), q), dH(p, q(u0))} = max{dH(p(u0), q),dH(p, q(u0))} ≤ dH(p, q).

Thus, dH(Lp(u), Lq(u)) ≤ dH(p, q) for each u, so that

maxu

{dH(Lp(u), Lq(u))} ≤ dH(p, q). (7)

Conversely, assume that p(u) and q(u) are the points thatdetermine the Hausdorff distance between two curves p and q, i.e.,

dH(p, q) = dH(p(u), q(u)).

Since p and q are compatible and have no cusp, the two points p(u)and q(u) satisfy

p′(u) ◦ (p(u)− q(u)) and q′(u) ◦ (p(u)− q(u))

as shown in Fig. 7. Thus, Lp(u) ‖ Lq(u) and so u = u. Hence,

dH(p, q) = dH(p(u), q(u)) = dH(Lp(u), Lq(u))

≤ maxu

{dH(Lp(u), Lq(u))}. (8)

Eqs. (7) and (8) yield

dH(p, q) = maxu

{dH(Lp(u), Lq(u))}. �

Theorem 3.3. If b, p and q satisfy the hypotheses of Lemma 3.1 andb ∗ p and b ∗ q have no cusp, then

dH(b ∗ p, b ∗ q) = dH(p, q).

Proof. By Proposition 3.2 and by the regularity of b ∗ p and b ∗ q,

dH(p, q) = maxu

{dH(Lp(u), Lq(u))},

dH(b ∗ p, b ∗ q) = maxu

{dH(Lb∗p(u), Lb∗q(u))}.

By the Lemma 3.1,

dH(Lp(u), Lq(u)) = dH(Lb∗p(u), Lb∗q(u))

for each u. Therefore, we obtain

dH(b ∗ p, b ∗ q) = dH(p, q). �

The result of Theorem 3.3 can be used to find the Hausdorffdistance between an offset curveb∗rc and its approximationb∗rcafor the given planar regular curve b and offset distance r ∈ R,where c is the unit circular arc compatible with b and ca is thequadratic Bézier biarc approximation of c presented in Section 2.

Fig. 6. dH (Lp(u), Lq(u)) = dH (Lb∗p(u), Lb∗q(u)), for each u.

Fig. 7. Hausdorff distances dH (p, q) and dH (b ∗ p, b ∗ q).

Corollary 3.4. Let b be a planar regular curve with a norm of theGauss map less than π . Let c be the circular arc compatible with band ca the quadratic Bézier biarc G2 end-point interpolation. If b ∗ rcand b ∗ rca have no cusp except possibly at the end-points, then

dH(b ∗ rc, b ∗ rca) = r · dH(c, ca). (9)

Proof. If b∗ rc and b∗ rca have no cusp including both end points,then by Theorem 3.3 we obtain Eq. (9). Even if b ∗ rc and b ∗ rcahave a cusp at one or both end points, since the end points of b∗ rcand b ∗ rca coincide, the assertion follows. �

In the thesis of the third author, Kim [31], similar results have beenobtained about quadratic Bézier curves. They are extended in thiswork to regular curves.

4. Approximation method for offset curves and algorithm

In this section, we present a method for curvature continuousoffset approximation based on the circle approximation usingquadratic Bézier biarcs, and present our algorithm for theapproximation. Our method is a modification of Lee’s method [19]which uses quadratic Bézier curves for circle approximation, whileour method uses quadratic Bézier biarcs to achieve G2 end-pointinterpolation.

Page 5: Curvature continuous offset approximation based on circle approximation using quadratic Bézier biarcs

Y.J. Ahn et al. / Computer-Aided Design 43 (2011) 1011–1017 1015

Let b(u) be the given planar regular parametric curve such as aB-spline or NURBS curve, u ∈ [b0, b1], and let r ∈ R be the offsetdistance.

First, the given curve should be subdivided at the inflectionpoints, since a quadratic Bézier biarc cannot have inflection points.Also, the curve b(u) should be subdivided at the points where thesigned curvature κ(u) is−1/r , so that the convolution b∗rc has nocusp in the domain interior and Corollary 3.4 can be applied. Let Nbe the number of these subdivisions, and ti ∈ (b0, b1), i = 1, . . . ,Nbe the subdivision point. Put t0 = b0 and tN+1 = b1.

Now, for each segment, let αi be the half norm of the GaussmapN (b(u)), u ∈ [ti−1, ti]. We find the smallest positive integer Kisatisfying

ϵ

αi

Ki

<

TOLr

(10)

where TOL is the prescribed tolerance. Then each segment b(u),u ∈ [ti, ti+1], is subdivided into Ki smaller segments. In all, thecurve is subdivided intoN−i=0

Ki

segments. For each i, we find tij ∈ [ti, ti+1], j = 0, . . . , 2Kisatisfying

N(b(tij)) =j

2Ki· N(b(ti))+

1 −

j2Ki

· N(b(ti+1))

and compute the unit circular arc c(θ) and its G2 quadraticbiarc approximant ca(t), compatible with the segment b(u), u ∈

[ti,2j, ti,2j+2], j = 0, . . . , Ki−1. By Eq. (10) and the definition of ϵ(α),we have

dH(c, ca) <TOLr. (11)

For each i = 0, . . . ,N and j = 0, . . . , 2Ki − 1, we can obtainthe convolution curve (b ∗ rca)(u) = b(u) + ca(t(u)) using thereparametrization t = t(u) satisfying

b′(u) ‖ ca′(t)

in [ti,j, ti,j+1]. Since ca(t) is a quadratic Bézier curve, t(u) is rationalof degree d − 1 or 2d − 2, and (b ∗ rca)(u) is a rational curve ofdegree 3d−2 or 5d−4, when b(u) is a B-spline or NURBS of degreed, respectively [19].

For i = 0, . . . ,N and j = 0, . . . , Ki, all points (b ∗ rca)(ti,2j) lieon the offset curve b ∗ rc. Let U be the set of all knots of the splineb(u) in (b0, b1). For each j, if there is no knot in the open interval(ti,j, ti,j+1), then (b ∗ rca)(u) is one rational Bézier curve segmentin the interval. But if there is a knot in the open interval (ti,j, ti,j+1),then (b ∗ rca)(u) consists of two rational Bézier curve segmentsin the interval. Thus, the total number of segments of (b ∗ rca)(u),u ∈ [b0, b1] is

2N−i=0

Ki + m

where m is the number of knots in the open interval (b0, b1) thatare not equal to ti,j, i = 0, . . . ,N , j = 0, . . . , 2Ki.

Finally, the rational spline curve (b ∗ rca)(u), u ∈ [b0, b1] is theapproximation of the offset curve (b ∗ rc)(u) and

dH(b ∗ rc, b ∗ rca) = r · dH(c, ca) < TOL

by Eq. (11) and Corollary 3.4. Also by Proposition 2.1, the approxi-mant (b∗ rca)(u) is curvature continuous except for the cusps. Thesigned curvature of (b ∗ rca)(u) interpolates that of (b ∗ rc)(u) atu = ti,2j, i = 0, . . . ,N and j = 0, . . . , Ki. We present the algorithm

for G2 end-point interpolation of offset curve of given curve b(u)using rational curve (b ∗ rca)(u).ALGORITHM

input : b(u), [b0, b1], U , r , TOL.find ti ∈ (b0, b1), i = 1, · · · ,N satisfying κ(ti) = 0 or−1/r .set t0 = b0, tN+1 = b1for i from 0 to N do

subdivide b(u) into [ti, ti+1]

let αi be the half norm of N (b, [ti, ti+1])let Ki be the smallest positive integer satisfyingϵ(

αiKi) < TOL

find tij, j = 0, · · · , 2Ki such that

N(b(ti,j)) =j

2Ki· N(b(ti))+ (1 −

j2Ki) · N(b(ti+1))

for j from 0 to Ki − 1 dofind the quadratic Bézier biarc approximationca(t) which is compatible with b(u), u ∈

[ti,2j, ti,2j+2]

let mi,j be the number of knots in (ti,2j, ti,2j+2) −

{ti,2j+1}

put si,j0 = ti,2j and si,jmi,j+2 = ti,2j+2

let si,jk be the elements of (U ∩ (ti,2j, ti,2j+2)) ∪

{ti,2j+1} for k = 1, · · · ,mi,j +1, in increasing orderfor k from 0 to mi,j + 1 do

find t = t(u) satisfying b′(u) ‖ ca′(t), u ∈

[si,jk , si,jk+1]

calculate (b ∗ rca)i,j,k(u) = b(u) + rca(t(u)),u ∈ [si,jk , s

i,jk+1]

end doend do

end do

setm =

N−i=0

Ki−1−j=0

mi,j

output : N , Ki, mi,j, (b ∗ rca)i,j,k(u), si,jk

5. Numerical examples

We apply our approximation method to examples that werepresented by Lee et al. [19], as shown in Figs. 8–10. The initial curveb(u) in Figs. 8–10, is a uniform cubic B-spline, a cubic Bézier curve,and a quadratic NURBS curve, to be offset by r = 0.5, 1 and 0.6,respectively. They are all curvature continuous.

The cubic B-spline in Fig. 8 has four inflection points and twopoints satisfying κ(u) = −1/r for r = 0.5. So, the curve issubdivided into seven pieces b(u), u ∈ [ti, ti+1], i = 0, . . . , 6,and N = 6. The cubic Bézier curve and the quadratic NURBS inFigs. 9 and 10 have no inflection points and no points satisfyingκ(u) = −1/r for r = 1 and 0.6, so in that case N = 0.

In Fig. 8, there are three knots which are not equal to any ti,j, som = 3, in Fig. 9, there is no interior knot, m = 0, and in Fig. 10, atmost three knots are contained in some open interval (ti,j, ti,j+1),thusm ≤ 3.

In the examples of Figs. 8 and 9,b is a cubic curve, and so (b∗rca)is a rational curve of degree seven. In the case of quadratic NURBS,(b ∗ rca) is a rational curve of degree six. Using our algorithm, weget the approximant (b ∗ rca)(u) which is curvature continuousexcept for the cusps, as shown in Fig. 8(c)–Fig. 10(c).

Table 1 was first presented by Lee et al. [19]. They implementedthe approximation methods of Cobb (Cob), Elber and Cohen (Elband Elb2), Tiller and Hanson (Til), an extension of Hoschek and

Page 6: Curvature continuous offset approximation based on circle approximation using quadratic Bézier biarcs

1016 Y.J. Ahn et al. / Computer-Aided Design 43 (2011) 1011–1017

Fig. 8. (a) Uniform cubic B-spline (blue) curve b(u) and its control polygon(magenta). The inflectionpoints (small green circles) satisfyκ(u) = 0 and thepointswhere the offset has a cusp (small khaki circle) satisfy κ(u) = −1/r for r = 0.5.(b) The offset curve(green) b ∗ rc and its approximation (magenta) b ∗ rca , forTOL = 0.1. (c) The signed curvature κb∗rc(u) (green) and κb∗rca (u) (magenta). U =

{u1, u2, u3} is interior knot vector in (b0, b1). (For interpretation of the references tocolour in this figure legend, the reader is referred to the web version of this article.)

Wissel’s method (Lst and Lst2), and their method (Lee). They alsocompared the results obtained from these methods as shown inTable 1, which shows the number of control points for the errorwithin the given tolerance TOL. Later, Piegl and Tiller[9] added theresult from their method (P&T ). The last column in Table 1 is theresults by our approximation method.

The numbers in Table 1 show that the methods of Lst , Lst2,Lee and P&T are better than our method. But our method hassome merits which other methods do not have, e.g., G2 end-pointinterpolation of offset curves and a-priori error analysis.

6. Conclusions

In this paper, we showed that the Hausdorff distance betweentwo compatible curves is invariant under convolution when thesehave no cusp in their domain interior. Using this fact and the circleapproximation by quadratic Bézier biarcs, we presented a methodfor G2 end-point interpolation of offset curves by rational Béziercurves.

Our approximation method has two merits. One is thata-priori error analysis can be obtained due to Theorem 3.3,so we can determine the number of subdivisions needed to

Fig. 9. (a) Cubic Bézier (blue) curve b(u) and its control polygon (magenta). (b) Theoffset curve (green)b∗c(u) and its approximation (magenta)b∗ca(u), for TOL = 0.1.The true Hausdorff distance is 1.44×10−2 . The (red) arrows are unit normal vectorsat end points and subdivision points. (c) The signed curvature κb∗c(u) (green) andκb∗ca (u) (magenta). (For interpretation of the references to colour in this figurelegend, the reader is referred to the web version of this article.)

Fig. 10. (a) Quadratic NURBS (blue) curve b(u) which represents unit circleand its control polygon (magenta). (b) The offset curve(green) b ∗ c(u) and itsapproximation (magenta) b ∗ ca(u), for TOL = 0.1. (c) The signed curvatureκb∗c(u) (green) and κb∗ca (u) (magenta). U = {u1, u2, u3}. (For interpretation of thereferences to colour in this figure legend, the reader is referred to the web versionof this article.)

achieve an approximation within a prescribed error tolerance.The other advantage of our method is that the curvature of ourapproximation interpolates the curvature of the offset curve for allsubdivision points and both end points.

In future work, we plan to consider circle approximations usingLN curves of high degree with high order of contact at both endpoints. Based on this approximation and using Theorem 3.3, high-order approximation of offset curves by rational curves could beobtained.

Page 7: Curvature continuous offset approximation based on circle approximation using quadratic Bézier biarcs

Y.J. Ahn et al. / Computer-Aided Design 43 (2011) 1011–1017 1017

Table 1Number of control points of spline approximant curves with their errors less thangiven tolerance TOL for the offset curve of (a) cubic B-spline in Fig. 8, (b) cubic Béziercurve in Fig. 9, and (c) quadratic NURBS in Fig. 10. Piegl and Tiller (P&T )[9] did notpresent the result in (c).

TOL Cob Elb Elb2 Til Lst Lst2 Lee P&T Our method

(a)

10−1 28 19 22 25 16 31 78 19 12010−2 73 57 55 67 48 49 92 33 16210−3 208 174 190 202 84 94 120 56 23210−4 637 417 550 640 138 166 176 101 33010−5 1846 1357 1690 1918 240 277 302 179 568

(b)

10−1 10 11 13 10 7 10 22 6 2910−2 31 24 25 31 13 19 29 9 4310−3 94 74 97 97 19 31 43 15 7110−4 316 216 247 322 31 46 71 25 11310−5 865 974 769 886 50 88 127 43 183TOL Cob Elb Elb2 Til Lst Lst2 Lee Our method

(c)

10−1 17 13 11 9 9 9 25 4910−2 33 53 27 9 13 17 49 7310−3 129 69 123 9 24 33 73 9710−4 513 261 299 9 46 65 121 16910−5 1025 524 1019 9 98 117 199 289

Acknowledgments

This researchwas supported by Basic Science Research Programthrough the National Research Foundation of Korea(NRF) fundedby the Ministry of Education, Science and Technology (2011-0010147); by grants CPATH 0722210 and CPATH 0938999 ofthe US National Science Foundation; and by a gift from theIntel Corporation. The authors are grateful to the editor and fiveanonymous referees for their valuable comments and constructivesuggestions.

References

[1] Jüttler B, Sampoli ML. Hermite interpolation by piecewise polynomial surfaceswith rational offsets. Comput Aided Geom Design 2000;17:361–85.

[2] Bastl B, Jüttler B, Kosinka J, Lávička M. Computing exact rational offsets ofquadratic triangular Bézier surface patches. Comput Aided Design 2008;40:197–209.

[3] Elber G, Cohen E. Error bounded variable distance offset perator for free formcurves and surfaces. Internat J Comput Geom Appl 1991;1:67–78.

[4] Hoschek J, Wissel N. Optimal approximate conversion of spline curvesand spline approximation of offset curves. Comput Aided Design 1988;20:475–483.

[5] Pottmann H, Leopoldseder S. A concept for parametric surface fitting whichavoids the parametrization problem. Comput Aided Geom Design 2003;20:343–62.

[6] Moon HP. Equivolumetric offsets for 2D machining with constant materialremoval rate. Comput Aided Geom Design 2008;25:397–410.

[7] Moon HP. Equivolumetric offset surfaces. Comput Aided Geom Design 2009;26:17–36.

[8] Kimmel R, Bruckstein AM. Shape offsets via level sets. Comput Aided Design1993;25:154–62.

[9] Piegl L, Tiller W. Computing offsets of NURBS curves and surfaces. ComputAided Design 1999;31:147–56.

[10] Seong JK, Elber G, Kim M-S. Trimming local and global self-intersections inoffset curves/surfaces using distance maps. Comput Aided Design 2006;38:183–93.

[11] Seong JK, Johnson DE, Elber G, Cohen E. Critical point analysis using domainlifting for fast geometry queries. Comput Aided Design 2010;42:613–24.

[12] Farouki RT, Sakkalis T. Pythagorean hodographs. IBM J Res Dev 1990;34:736–52.

[13] Choi HI, Farouki RT, Kwon S-H, Moon HP. Topological criterion for selectionof quintic Pythagorean-hodographHermite interpolants. Comput Aided GeomDesign 2008;25:411–33.

[14] Farouki RT, Sederberg TW. Analysis of the offset to a parabola. Comput AidedGeom Design 1995;12(6):639–45.

[15] Šír Z, Bastl B, LávičkaM.Hermite interpolation byhypocycloids and epicycloidswith rational offsets. Comput Aided Geom Design 2010;27:405–17.

[16] Lávička M, Bastl B. PN surfaces and their convolutions with rational surfaces.Comput Aided Geom Design 2008;25:763–74.

[17] Peternell M, Pottmann H. A laguerre geometric approach to rational offsets.Comput Aided Geom Design 1998;15:223–49.

[18] Pottmann H. Rational curves and surfaces with rational offsets. Comput AidedGeom Design 1995;12:175–92.

[19] Lee IK, Kim M-S, Elber G. Planar curve offset based on circle approximation.Comput Aided Design 1996;28:617–30.

[20] Lü W. Rational offsets by reparametrizations, preprint, 1992.[21] Aigner M, Jütler B, Gonzalez-Vega L, Schicho J. Parameterizing surfaces with

certain special support functions, including offsets of quadrics and rationallysupported surfaces. J Symb Comput 2009;44:180–91.

[22] Sampoli M, Peternell M, Jüttler B. Exact parameterization of convolutionsurfaces and rational surfaces with linear normals. Comput Aided GeomDesign 2006;23:179–92.

[23] Farin G. Curves and Surfaces for CAGD. San Francisco: Morgan-Kaufmann;2002.

[24] Ahn YJ, Kim HO. Curvatures of the quadratic rational Bézier curves. ComputMath Appl 1998;36:71–83.

[25] BartoňM, Hanniel I, Elber G, KimM-S. Precise Hausdorff distance computationbetween polygonal meshes. Comput Aided Geom Design 2010;27:580–91.

[26] Emery JD. The definition and computation of ametric on plane curves. ComputAided Design 1986;18:25–8.

[27] Elber G, Lee IK, KimM-S. Comparing offset curve approximation method. IEEEComput Graph Appl 1997;17(3):62–71.

[28] Hur S, Kim T. Finding the best conic approximation to the convolution curveof two compatible conics based on Hausdorff distance. Comput Aided Design2009;41:513–24.

[29] Lee IK, Kim M-S, Elber G. Polynomial/rational approximation of Minkowskisum boundary curves. Graph Models Image Process 1998;60:136–65.

[30] Peternell M, Odehnal B. Convolution surfaces of quadratic triangular Béziersurfaces. Comput Aided Geom Design 2008;25:116–29.

[31] Kim YS. Bézier approximation of offset curves and Quadratic interpolation ofplane curves. Ph.D. thesis. Ajou University; 2004.