Curve interpolation based on the canonical arc length parametrization

11
See discussions, stats, and author profiles for this publication at: https://www.researchgate.net/publication/220582535 Curve interpolation based on the canonical arc length parametrization Article in Computer-Aided Design · January 2011 DOI: 10.1016/j.cad.2010.07.007 · Source: DBLP CITATIONS 5 READS 106 2 authors, including: Spiros Papaioannou University of Patras 16 PUBLICATIONS 116 CITATIONS SEE PROFILE All content following this page was uploaded by Spiros Papaioannou on 22 November 2014. The user has requested enhancement of the downloaded file. All in-text references underlined in blue are added to the original document and are linked to publications on ResearchGate, letting you access and read them immediately.

Transcript of Curve interpolation based on the canonical arc length parametrization

Seediscussions,stats,andauthorprofilesforthispublicationat:https://www.researchgate.net/publication/220582535

Curveinterpolationbasedonthecanonicalarclengthparametrization

ArticleinComputer-AidedDesign·January2011

DOI:10.1016/j.cad.2010.07.007·Source:DBLP

CITATIONS

5

READS

106

2authors,including:

SpirosPapaioannou

UniversityofPatras

16PUBLICATIONS116CITATIONS

SEEPROFILE

AllcontentfollowingthispagewasuploadedbySpirosPapaioannouon22November2014.

Theuserhasrequestedenhancementofthedownloadedfile.Allin-textreferencesunderlinedinblueareaddedtotheoriginaldocument

andarelinkedtopublicationsonResearchGate,lettingyouaccessandreadthemimmediately.

Computer-Aided Design 43 (2011) 21–30

Contents lists available at ScienceDirect

Computer-Aided Design

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

Curve interpolation based on the canonical arc length parametrizationSpiros G. Papaioannou ∗, Marios M. PatrikoussakisDepartment of Mechanical and Aerospace Engineering, University of Patras, Patra, Greece

a r t i c l e i n f o

Article history:Received 8 July 2009Accepted 4 July 2010

Keywords:CNC interpolatorsSTEP-NCCanonical equationsCurvatureTorsion

a b s t r a c t

We use the canonical equations (CE) of differential geometry, a local Taylor series representation of anysmooth curve with parameter the arc length, as a unifying framework for the development of new CNCalgorithms, capable of interpolating 2D and 3D curves, represented parametrically, implicitly or as surfaceintersections, with accurate feedrate control. We use a truncated form of the CE to compute a preliminarypoint, at an arc distance from the last interpolation point selected to achieve a desired feedrate profile.The next interpolation point is derived by projecting the preliminary point on the curve. The coefficientsin the CE involve the curve’s curvature, torsion and their arc length derivatives. We provide computingprocedures for them for commonCartesian representations, demonstrating the generality of the proposedmethod. In addition, our algorithms admit corrections, which render themmore accurate in terms of theprogrammed feedrate, compared to existing parametric algorithms of the same order.

© 2010 Elsevier Ltd. All rights reserved.

1. Introduction

Recentwork on interpolation algorithms for CNC [1–8] has beenmotivated by theoretical considerations and the need to addressthe following practical requirements:

(a) Increase the capability of CNC systems for machiningcomplex geometries. This is currently limited to straight line andcircular cuts. Extending it to more complex geometries requiresinterpolation algorithms for general curves and surfaces.

(b) Improve the CAD/CAM interface. This is presently charac-terized by gross inefficiency. Complex geometries to be machined,arising in CAD, are approximated in a CAM system by numerousshort straight line cutter moves, to accommodate present CNC ca-pabilities as described in (a). The resulting transmission of a largevolume of short move data from CAM to the CNC machine, withtangent discontinuities between adjacentmoves, degrades the cut-ting conditions and the quality of the machined surfaces [4].

(c) Improve cutting conditions in high-speed machining, byallowing for variable time, arc length and curvature dependentfeedrates [7,9].

To overcome these and other shortcomings, the internationalSTEP-NC program is currently underway [1,2]. Being an offshoot ofSTEP (STandard for the Exchange of Product model data), STEP-NCaims at transmitting original CAD curve and surface data to theCNC in a portable neutral format, together withmachining processand tool path planning or explicit tool movement informationgenerated by CAM. A first STEP-NC standard, compatible with

∗ Corresponding author. Tel.: +30 2610 433592; fax: +30 2610 997744.E-mail address: [email protected] (S.G. Papaioannou).

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

present CNC capabilities and known as Application Protocol 238(AP238) has evolved. Subsequent standards will be addressedto more sophisticated types of future CNC’s. It is expected that,eventually, the need for transmitting large volumes of explicit toolmovement data from CAD/CAM to present CNC systems, whicharises when free-form geometries are to be machined, will beeliminated by a new generation of CNC controls, incorporatinggeneral interpolation algorithms, capable of converting the originalCAD curve and surface data to tool movement commands, in realtime.

CNC interpolators generate a sequence of steps on a curve. Thissequence defines a trajectory performed in real time by the tip ofa cutting tool. In modern interpolators, each iteration starts fromthe current point Pi on the curve and locates the following pointPi+1, at an arc distance s from Pi, selected to achieve a desiredtraverse speed (feedrate) profile. In the control computer, this isusually implemented by generating each new point within a fixedsampling interval 1t (typically 1 ms) and commanding the newstep when 1t expires. The feedrate υ is controlled by setting thestep size s equal to the time integral of the prescribed υ functionover 1t . For constant feedrate s = υ1t . Modern algorithms mustbe capable of accommodating time, arc length and curvaturedependent feedrates [9].

Accurate control of the feedrate is critical in high-speedmachining. Complete feedrate accuracy, however, can be achievedonly at the expense of generality. The root of this issue liesin mathematics, since it is not generally possible to expressarc length, and hence speed, as a rational function of thecurve’s parameter [9]. To solve the problem, Farouki and hiscoworkers have extensively investigated Pythagorean hodograph(PH) curves [5–10], a special class of parametric curves for whicha rational speed expression exists, thus achieving full feedrate

22 S.G. Papaioannou, M.M. Patrikoussakis / Computer-Aided Design 43 (2011) 21–30

a b

Fig. 1. Locating the next interpolation point Pi+1: (a) Without correction. (b) Using a corrected arc distance d in the CE.

accuracy in their interpolation by compromising on generality.Given the lack of rational speed expressions for broader classesof curves, an important issue to be addressed is achieving a betterbalance between feedrate accuracy, generality and efficiency.

Other authors have investigated the use of various approxima-tions for particular types of representations. Huang and Lo de-veloped independently in their Ph.D. dissertations interpolationalgorithms for plane parametric curves, based on truncated Taylorseries expressions of the curve’s parameter as a function of time.These parametric algorithms originally published in [3,4] werelater extended to higher order Taylor series approximations, 3Dcurves and variable feedrates by Farouki and Tsai [9]. They locatepoints lying exactly on the curve but, apart from the truncation er-ror, they also involve a feedrate error arising from the variation ofthe parametric speed ds/du along the curve. In addition, the exten-sion of these algorithms to plane implicit curves and to 3D curvesdefined as surface intersections, a common situation in CAD, hasnot been demonstrated. A discussion of the state of the art in in-terpolation for CNC is presented in [10].

In this paper we lay the foundation for new interpolationalgorithms for CNC, termed CE algorithms, which are basedon a curve’s canonical equations (CE) known from differentialgeometry [11,12]. The CE provide a local parametric Taylor seriesrepresentation of a curve

xl(s) = s −k2

6s3 −

kk8s4 + O(s5)

yl(s) =k2s2 +

k6s3 +

k − kτ 2− k3

24s4 + O(s5)

zl(s) =kτ6

s3 +2kτ − kτ

24s4 + O(s5) (1)

in the vicinity of a given point, which in each iteration we identifywith the last interpolation point Pi. The term local indicates thatthe CE are valid in the local Cartesian system (Frenet trihedron)formed by the unit tangent, normal and binormal vectors T,N, Bat Pi. The index l emphasizes that xl, yl, zl are local coordinates ofthe curve, not to be confused with the coordinates of the curve’s‘‘global’’ representation.

The CE are available for any continuous curve with continuousderivatives and possess the desirable property of being polynomialexpressions in the curve’s arc length s, measured from Pi.The coefficients in these expressions involve the curve’s localcurvature k, torsion τ and their arc length derivatives k, τ , k, . . . ,quantities which can be expressed in closed form for any curverepresentation, in any coordinate system. This fact and theavailability of the CE for all smooth curves account for thegenerality of the proposed CE algorithms, in terms of curverepresentation and associated coordinate systems.

We use a truncated form of the CE in the beginning of eachiteration, to compute a preliminary pointPp

i+1 at arc distance s fromPi (Fig. 1(a)). The step size s is selected to realize a prescribed localfeedrate. An nth order CE approximation, n = 1, 2, 3, . . . , has nthorder contact to the curve and Pp

i+1, although not on the curve, is

generally located at a high order infinitesimal distance from thesought next interpolation point on it, when s is small. Its projectionPi+1 on the curve approximates even closer the true point and isused as the next interpolation point.

In terms of feedrate accuracy, CE algorithms are characterizedby the absence of variation in the parametric speed (ds/du), asource of feedrate error in existing parametric algorithms. Thisis because in the CE parametrization ds/du = ds/ds = 1. CEalgorithms, on the other hand, involve a point projection, which isalso a source of error. It is shown that this error can be significantlyreduced by using a proper correction in the computation ofthe preliminary point Pp

i+1. The ability of the CE algorithms toadmit corrections results in higher feedrate accuracy, compared toexisting parametric algorithms of the same order.

The local values of k, τ , k, τ , k, . . . involved in the CE are mostconveniently obtained if the curve is expressed parametrically.To extend their computation to implicit 2D and to 3D curverepresentations we regard one of the representation variables asa free parameter and the remaining variables as implicit functionsof the parameter, through the equations of the representation.This is always possible since the number of equations definingthe curve, which ranges from one (for a plane implicitly definedcurve) to three (for a 3D curve defined as the intersection of twoparametrically expressed surfaces), is in all cases one less than thenumber of variables. One variable can thus always be regardedas free. This implicit parametrization (or IP) of the curve workswith CE algorithms without numerical difficulties, other than theexpected ones at cusps or points of self-intersection, which affectall algorithms, since at such points the curve’s tangent, whichguides the interpolation, is ill-defined.

For parametric curves represented as r = [x(u), y(u), z(u)]T,expressions of k, τ , k, τ , k have long been known [9,11,12] andare summarized in Appendix A.1. It is emphasized that all theseexpressions are functions of the curve’s parametric derivativesr′, r′′, r′′′, r′′′′. Recent literature has provided curvature andtorsion calculations for the plane implicit curve representationf (x, y) = 0 and for 3D curves defined as intersections of twosurfaces represented implicitly as f (x, y, z) = 0, g(x, y, z) = 0,parametrically or in a mixed parametric/implicit mode [13–16].None of these works, however, has dealt with the calculationof the arc length derivatives k, τ , k for such representations.We show that the IP concept fills this gap. It permits recursiveexpressions of the derivatives r′, r′′, r′′′, r′′′′ to be derived ina straightforward manner, in terms of the partial derivativesfx, fxx, fxy, fxz, . . . , gx, gxx, . . . , of the functions involved in thecurve’s definition. Thus, it makes possible the computation ofall differential quantities depending on r′, r′′, r′′′, r′′′′, i.e. of thecurvature k, torsion τ , their arc length derivatives k, τ , k, . . .and the Frenet frame vectors T,N, B, for curves defined byany common representation. Finally, although we consider onlyCartesian representations, this is not a limitation. Procedures forother coordinate systems can also be worked out.

Although we focus on the theory of CE-based interpolation,the proposed CE algorithms can easily evolve into practical CNC

S.G. Papaioannou, M.M. Patrikoussakis / Computer-Aided Design 43 (2011) 21–30 23

software, if due consideration is given to the following: A curve isto be generally understood as a trajectory of the cutter’s contactpoint (CC point) with the machined surface. By interpolatingthis curve, CE algorithms generate motion of the CC point withfeedrate control. The CC is not a fixed tool point, however, andthe programmed tool motion in 3Dmachining is generally definedby the motion of a selected fixed point on the cutter axis, whosemomentary position represents the cutter’s location (CL point).Therefore, practical CNC algorithmsmust include the computation,in each step, of the CL point from the CC point, for variouscutter geometries [17]. The connection between particular curverepresentations and practical machining strategies are discussedin the following sections, when the occasion arises. More complexmachining tasks, where the cutting tool’s and the machinedfeature’s geometry must be considered as an integral part of theCC or the CL point computation, will be dealt with in future work.

The rest of the paper is organized as follows: Section 2introduces the general approach to interpolation based on theCE, as applied to parametric curves represented by r = [x(u),y(u), z(u)]T . Sections 3 and 4 use the IP concept to extend theCE approach to plane curves defined implicitly by f (x, y) = 0and to 3D curves defined as intersections of surfaces. Section 5discusses the numerical solution of the point projection problem,using Newton’s method. A convergence condition for Newton’siterations is developed in Appendix A.4. Sections 6 and 7 deal withvariable feedrates and with the derivation of corrections whichimprove feedrate accuracy. Sections 8 and 9 conclude the paperwith the presentation of computational results and some finalcomments.

2. Interpolation based on the canonical equations

The next interpolation point Pi+1 is generally defined by itsarc length distance s from Pi. In the proposed CE algorithms, s isinserted in the truncated CE (Eq. (1)) to compute a preliminarypoint Pp

i+1 = [xpl , ypl , z

pl ]

T (Fig. 1(a)). This point lies close to thecurve and to the true interpolation point on it. Although the truepoint cannot be located exactly, it can be approximated with highaccuracy by the projection point Pi+1 of Pp

i+1 on the curve.Since the coordinates xpl , y

pl , z

pl of Pp

i+1 computed from the CEare in the local Frenet frame defined by the unit vectors T,N, B,to obtain the projection point Pi+1 we must first transfer Pp

i+1 tothe ‘‘global’’ coordinate system in which the curve resides. Thisrequires the transformationPpg

= [Pi] + [T]glPpl

(2)

wherePpl,Ppgare the local and global coordinate vectors of

Ppi+1, [Pi] is the global coordinate vector of Pi and [T]gl is the

transformation matrix from the local to the global system.Recursive expressions for the computation of k, τ , k, τ , k, T,

N, B at Pi, for curves, represented parametrically by r = [x(u),y(u), z(u)]T are provided in Appendix A.1. The curvature k, torsionτ and their arc length derivatives are required to apply theCE, while T,N, B are used to form the transformation matrix[T]gl in Eq. (2). Once the global coordinate vector

Ppgof the

preliminary point Ppi+1 is obtained, the projection point Pi+1

is computed numerically using Newton’s method. Apart fromPi+1, the projection computation also provides the correspondingvalue of u, which we need to compute k, τ and their arc lengthderivatives at Pi+1, to start the next iteration.

Parametric representations of 3D curves arise in the isopara-metric machining of surface patches represented by r = [x(u, υ),y(u, υ), z(u, υ)]T , 0 ≤ u, υ ≤ 1. The cutter is directed to move inzig-zag or unidirectional fashion along a path consisting of a familyof n closely spaced isoparametric lines, covering the entire patch.

An isoparametric path of the cutter’s contact point (CC) is defined,for example, by ri = [x(u, υi), y(u, υi), z(u, υi)]

T , i = 1, 2, . . . , n,with each pass of the cutter generated by keeping υi constant andvarying u. The side step 1υ = υi+1 −υi determining the next passri+1 must be selected to keep the height of the ridge-like uncutma-terial (scallop) left between passes ri, ri+1 within a small tolerancelimit [18,19].

3. Implicit parametrization

A parametric curve representation r = [x(u), y(u), z(u)]T ismost convenient, since then theparametric derivatives x′, y′, z ′, . . .(the components of r′, r′′, r′′′, r′′′′) are easily computed once uis known. But when this convenience is not available, acquir-ing it, a task known as parametrization, is not always possible.For example, not all algebraic implicit curves or surfaces can beparametrized in terms of polynomial or rational polynomial func-tions [20]. In this section we show that assuming the existence ofan explicit parametric representation is not necessary.

Consider a plane curve defined implicitly by f (x, y) = 0. Wecan approach the interpolation problem by considering one of thecoordinates x, y as a free parameter and the other as an implicitfunction of the parameter through the defining equation. We callthis perspective implicit parametrization (IP). To establish a basis fordiscussion, assume that x is the free parameter so that x′

= 1, x′′=

x′′′= · · · = 0. Introducing these values into the expressions

(A.1.1), (A.1.7) for s′, s′′, s′′′ and (A.1.5), (A.1.6), (A.1.8), (A.1.10)1 fork, k, k, T,N, dropping all z-terms and setting τ = 0, we obtain

s′ = (1 + y′2)1/2, s′′ =y′y′′

s′, s′′′ =

y′′2+ y′y′′′

− s′′2

s′(3)

k =y′′

s′3, k =

y′′′− 3ks′2s′′

s′4,

k =y′′′′

− 7ks′3s′′ − 6ks′s′′2 − 3ks′2s′′′

s′5

(4)

T =

[1s′

,y′

s′

]T, N =

[−

y′

s′,1s′

]T. (5)

These expressions permit the use of up to fourth orderCE. To use them, we first compute y′, y′′, y′′′, y′′′′ from theirrecursive expressions provided in Appendix A.2 (Eqs. (A.2.2)–(A.2.5)), which relate y′, y′′, y′′′, y′′′′ to partial derivatives ofthe function f (x, y). These last expressions must be used withcaution, since they all have a power of fy as their denominatorand assume infinitely large values when fy = 0 (refer toAppendix A.2). A simple remedy to this problem is to use x asparameter only as long as |fy| ≥ |fx|. When |fx| > |fy|, we replacex by y. We then need to compute x′, x′′, x′′′, x′′′′ from expressionsanalogous to those provided for y′, y′′, y′′′, y′′′′ in Appendix A.2.Thesewill have fx as their common denominator, and the conditionpreventing fx from vanishing is just |fx| > |fy|. A geometricinterpretation of this rule is providedby the expression t = [fy,−fx]for the tangent vector (see Eq. (7) below). The problem occurswhen the tangent vector is perpendicular to the coordinate axisassociated with the current parameter and by not allowing fy/fxto vanish when x/y serves as a parameter, the tangent vector isprevented fromever assuming a similar orientation.When this ruleis enforced, Eqs. (A.2.2)–(A.2.5) and (3)–(5) can be used safely.

Another safe approach is to develop numerically robustexpressions for k, k, T,N by eliminating the recursion, i.e. byexpressing y′, y′′, y′′′ in terms of partial derivatives of f (x, y) alone

1 Equations whose designation starts with A are located in the Appendix.

24 S.G. Papaioannou, M.M. Patrikoussakis / Computer-Aided Design 43 (2011) 21–30

and inserting them into Eqs. (3)–(5), to get,

k =2f xfyfxy − f 2x fyy − f 2y fxx

(f 2x + f 2y )3/2

k =3f xf 2y fxxy − 3f 2x fyfxyy + f 3x fyyy − f 3y fxxx

(f 2x + f 2y )2

−3(2f xfyfxy − f 2x fyy − f 2y fxx)[fxfy(fxx − fyy) − fxy(f 2x − f 2y )]

(f 2x + f 2y )3(6)

T =1

(f 2x + f 2y )1/2

fy, −fx

T, N =

1(f 2x + f 2y )1/2

fx, fy

T. (7)

Eqs. (6)–(7) allow the use of up to third order CE. The fourth orderCE requires k, but obtaining a numerically robust expression for itis cumbersome.

In CNC practice, the above equations and the CE can be used todirect an end milling cutter in the 2 1

2 D peripheral machining of apart, whose boundary is an implicitly defined plane curve [17].

4. Extension to surface intersections

A 3D curve may also be defined as the intersection of two sur-faces, each of which may be represented implicitly or paramet-rically. This gives rise to three possible curve representations, ofwhich computationally simpler is the hybrid case, where one of theintersecting surfaces is expressed implicitly as f (x, y, z) = 0 andthe other parametrically as x = x(u, v), y = y(u, v), z = z(u, v).The curve representation then reduces to a single implicit equationf (x(u, v), y(u, v), z(u, v)) = 0 in the parametric u − v domain.In the pure implicit case, both surfaces are expressed implicitly asf (x, y, z) = 0, g(x, y, z) = 0. The intersection curve is then repre-sented by the system of these two equations in the three positionvariables x, y, z. In the pure parametric case, the intersecting sur-faces are represented by x = c(u, v), y = d(u, v), z = e(u, v) andx = f (r, t), y = g(r, t), z = h(r, t) and the curve by the threeequations c(u, v) = f (r, t), d(u, v) = g(r, t), e(u, v) = h(r, t), inthe four parameter variables u, v, r, t .

To extend the CE algorithms to surface intersections, it isconvenient to compute k from the first of Eq. (A.1.4) as a positivequantity

k =

r′ × r′′

s′3

=[(x′y′′

− x′′y′)2 + (y′z ′′− y′′z ′)2 + (z ′x′′

− z ′′x′)2]1/2

s′3. (8)

This equation must be adapted for use with each of theabove representations. Recursive expressions for computingx′, x′′, y′, y′′, z ′, z ′′ are provided in Appendix A.3. They are basedon the IP concept, i.e. on the assumption that x or u is a freeparameter and that the remaining variables are implicit functionsof the parameter.

Given the increased complexity of surface intersections, wemust decide how much accuracy we can afford. A reasonablecompromise is to retain in the CE terms up to third order, whichrequires only k, τ , k.We consider first the intersection curve of twosurfaces defined implicitly as f (x, y, z) = 0, g(x, y, z) = 0 (pureimplicit representation). To compute k, τ , k and the Frenet framevectors when x is the parameter, we first set x′

= 1, x′′= x′′′

= 0and then use (A.3.2), (A.3.4) and (A.3.5) to obtain y′, z ′, y′′, z ′′, y′′′,z ′′′, (A.1.1) and Eq. (8) to compute k and, finally, (A.1.5)–(A.1.8)to compute τ , k, T,N, B. An analogous process is used when theparameter is y or z (refer to Appendix A.3).

The recursive expressions (A.3.2), (A.3.4) and (A.3.5) fory′, z ′, y′′, z ′′, y′′′, z ′′′ must, however, be used cautiously, since theyall have X = (fygz − fzgy) as their denominator, which can become0. X is the x-component of the curve’s tangent vector ∇f × ∇gso, when x is the parameter, the undesirable condition X = 0occurs when the tangent vector is perpendicular to the x-axis, asin the 2D case. To avoid this problem, we need to apply a rulereplacing the free parameter on time by another variable. A simplerule is to use x as parameter as long as |X | = max(|X |, |Y |, |Z |)and similarly y when |Y | = max(|X |, |Y |, |Z |) and z when |Z | =

max(|X |, |Y |, |Z |). Again, this rule shifts the axis associated withthe current parameter on time, to prevent ∇f × ∇g from everbecoming perpendicular to it.

Alternatively, introducing into Eqs. (8), (A.1.1) and (A.1.6)the expressions (A.3.2), (A.3.4) and (A.3.5) for y′, z ′, y′′, z ′′, andeliminating the recursion, we arrive at the following robustexpressions for the curvature and the Frenet frame vectors

k =

(fxcg − gxcf )2 + (fycg − gycf )2 + (fzcg − gzcf )2

1/2(X2 + Y 2 + Z2)3/2

cf = fxxX2+ fyyY 2

+ fzzZ2+ 2fxyXY + 2fxzXZ + 2fyzYZ

cg = gxxX2+ gyyY 2

+ gzzZ2+ 2gxyXY + 2gxzXZ + 2gyzYZ

X = (fygz − fzgy), Y = (fzgx − fxgz),Z = (fxgy − fygx)

(9)

T =[XYZ]

T

(X2 + Y 2 + Z2)1/2, N = B × T,

B =[(fxcg − gxcf )(fycg − gycf )(fzcg − gzcf )]T

(X2 + Y 2 + Z2)3/2k

(10)

which do not depend on the variable used as parameter and sufficefor applying the second order CE. Obtaining robust expressions forτ , k, however, is cumbersome.

For the intersection of two surfaces represented by x =

c(u, v), y = d(u, v), z = e(u, v) and x = f (r, t), y =

g(r, t), z = h(r, t) (pure parametric representation), assumingthat u is the free parameter, we proceed in a similar fashion. Theparametric derivatives x′, y′, z ′ and x′′, y′′, z ′′ are computed fromtheir expressions in Appendix A.3.

For the hybrid representation f (x(u, v), y(u, v), z(u, v)) = 0, itis convenient to interpolate the curve in the u− v plane, using theexpressions in Appendix A.2 for plane curves. The price to be paidfor this convenience is an additional computation required in eachiteration to determine the ‘‘virtual’’ local feedrate υ∗ in the u − vplane from the required real feedrate υ in the x − y − z Cartesianspace. We can relate these feedrates by observing that

υ2=

dxdt

2

+

dydt

2

+

dzdt

2

=

xu

dudt

+ xv

dvdt

2

+

yu

dudt

+ yv

dvdt

2

+

zu

dudt

+ zvdvdt

2

(11a)

and combining this with the equation

dfdt

= fududt

+ fvdvdt

= 0 (11b)

to form a system for dudt ,

dvdt , from whose solution it is found that

υ∗2=

dudt

2

+

dvdt

2

=(f 2u + f 2v )υ2

(xufv − xv fu)2 + (yufv − yv fu)2 + (zufv − zv fu)2. (12)

S.G. Papaioannou, M.M. Patrikoussakis / Computer-Aided Design 43 (2011) 21–30 25

This concludes the discussion regarding the computation of Ppi+1

from the CE, in all of the above three representations.A family of n closely spaced 3D curves, defined as intersections

of a surface f (x, y, z) = 0 to be machined by a family of ‘‘cuttingsurfaces’’ g(x, y, z, ai) = 0, i = 1, 2, . . . , n can be connected todefine a path of the cutter’s contact point (CC path) on f (x, y, z) =

0. A usual practice is isoplanarmachining, where the cutting familyg(x, y, z, ai) = 0 consists of parallel planes [21,22].

5. The point projection problem

Let n =−−−−−→Ppi+1Pi+1 be the vector which starts at Pp

i+1 =

[xpg , ypg , z

pg ]

T and ends at the projection point Pi+1 = [x, y, z]T(Fig. 1). Pi+1 is generally found by solving a system composedof the equations involved in the curve’s definition and thenormality condition n · t = 0, where t is any vector tangentto the curve at Pi+1. For curves defined parametrically by r =

[x(u), y(u), z(u)]T ,n = [(xpg − x(u))(ypg − y(u))(zpg − z(u))]T,t = [x′(u), y′(u), z ′(u)]T and the only equation to be solved is thenormality condition

h(u) = (xpg − x(u))x′(u) + (ypg − y(u))y′(u) + (zpg − z(u))z ′(u)

= 0. (13)

Newton’s iteration is

uj+1 = uj

−(xpg − x)x′

+ (ypg − y)y′+ (zpg − z)z ′

(xpg − x)x′′ + (ypg − y)y′′ + (zpg − z)z ′′ − x′2 − y′2 − z ′2(14)

where x, x′, x′′, y, y′, y′′, z, z ′, z ′′ are evaluated at uj. For planecurves defined implicitly by f (x, y) = 0, the normality conditionbecomes

h(x, y) = (xpl − x)fy − (ypl − y)fx = 0. (15)

It now involves two unknown variables and must be solved as asystem with the equation f (x, y) = 0 to obtain Pi+1. Newton’siteration is

xj+1 = xj +fyh − fhy

fxhy − fyhx, yj+1 = yj +

fhx − fxhfxhy − fyhx

(16)

where all functions on the r.h.s. are evaluated at xj, yj. When moreequations are involved in the curve’s definition, Newton’s generalformula for systems

pj+1 = pj − J−1(pj)F(pj) (17)

is used, where p is the vector of the unknown variables, F(p) isthe vector of functions in the in curve’s definition and J−1(p) is theinverse of the Jacobian matrix of these functions with respect tothe unknowns. In all cases, the iterations start at the closest knownpoint Pi.

It is instructive to view the point projection problem inconnection with 3D curve tracing methods developed in CAD.Identifying and tracing surface intersections is a basic CADproblem, where tracing of the intersection is primarily approachedby marching methods [23]. The proposed CE algorithms are alsomarching techniques, which share a common aspect with CADmarching methods: The next point on the curve is obtained bysolving a system of 2, 3 or 4 equations. These equations but one aresupplied by the curve’s definition, as discussed above. But whereasin CAD the curve is approximated by a series of chords, designed tokeep themaximumdeviation from itwithin a prescribed tolerance,and the next chord is computed by completing the systemwith theequation of a plane or other surface cutting the curve, in the CEalgorithms the equation completing the system is the normalitycondition expressing the projection of the preliminary point Pp

i+1on the curve.

6. Variable feedrate

To maintain accurate feedrate, its variation during each stepmust be accounted for exactly or, if this is not possible, witha high degree of accuracy. This is accomplished in differentways, depending on the interpolationmethod. Existing parametricalgorithms estimate the next parameter value ui+1 from theparameter versus time function, expressed as a truncated Taylorseries [3,4,9]. The coefficients in this series involve the feedrateυ and its parametric derivatives υ ′, υ ′′, . . . . Thus, the feedrateerror is included in the series truncation error. The computationof υ ′, υ ′′, . . . for time, arc length or curvature dependent feedrateis discussed in [7,9]. PH algorithms, on the other hand, obtain theexact value of the next parameter ui+1 by reducing the integral inthe equation∫ ui+1

ui

s′

υdu = 1t (18)

to a function of the upper limit ui+1 and solving the resultingequation by Newton’s method [9,10]. This is generally possible if υis a simple function of s or k, given that in PH algorithms the lattercan be expressed as rational functions of u. If υ is prescribed as anintegrable time function, the equation

s = s(ui+1) − s(ui) =

∫ (i+1)1t

i1tυdt (19)

is solved instead for ui+1.In the proposed CE algorithms, the CE do not involve the

feedrate. To account for the feedrate variation during each step, wecompute the stepmagnitude s fromEq. (19) and insert the resultingvalue in the CE to obtain Pp

i+1. If υ is not prescribed as an integrabletime function,we compute its timederivatives as shownbelowandobtain s from a truncated form of the Taylor series

s = υ1t +12dυdt

(1t)2 +16d2υ

dt2(1t)3 + · · · . (20)

If υ is a function of arc length, its derivatives are obtained byapplying the operator d

dt = υ dds . Thus,

dυdt

= υdυds

,d2υ

dt2= υ

dds

dυdt

= υ

dυds

2

+ υ2 d2υ

ds2. (21)

Ifυ is prescribed as a function of curvature, the operator ddt = υ d

dk kyields

dυdt

= υdυdk

k,d2υ

dt2= υ

dυdk

2

k2

+ υ2 d2υ

dk2k2 + υ2 dυ

dkk. (22)

7. Location of Ppi+1 with a corrected arc length

Using higher orders of the CE results in higher feedrate accuracybut is computationally expensive. In this section we propose a lessexpensive way to improve feedrate accuracy. We show that thepolynomial form of the CE permits corrected, substantially moreaccurate positions of the preliminary point Pp

i+1 to be computedfrom lower CE orders.

To obtain a corrected position of Ppi+1 from the nth order CE,

n = 1, 2, 3, we assume that the curve is represented by themore accurate fourth order CE. We then project Pp

i+1 on this fourthorder CE approximation and require the projection point P4

i+1 onit to lie at a prescribed arc distance s from Pi (Fig. 1(b)). Whenthis condition is fulfilled the arc on the nth order CEdefines the corrected position of Pp

i+1. To compute d, wemust solve

26 S.G. Papaioannou, M.M. Patrikoussakis / Computer-Aided Design 43 (2011) 21–30

Table 1Corrected arc lengths d(s) for computing Pp

i+1 from the nth order CE, n = 1, 2, 3.

Order of CE algorithm d(s) d(s) for balancingaccuracy with efficiency

First s +k2s33 +

23kks424 s +

k2s33

Second s −k2s36 −

7kks424 s −

k2s36

Third s −kks48 s −

kks48

the normality condition F(d, s) = Pr(d, s) · T(s) = 0, where

Pr(d, s) =−−−−−−−−−→Ppi+1(d)P

4i+1(s) is the projection vector and T(s) is the

tangent vector at P4i+1. To form the condition F(d, s) = 0, we first

write T(s) as a fourth order Taylor approximation

T(s) = T(0) + T(0)s + T(0)s2

2+

...T(0)

s3

6+

....T (0)

s4

24

=

1 −

k2s2

2−

3kks3

6+

(−3k2 − 4kk + k2τ 2+ k4)s4

24

T(0)

+

ks +

ks2

2+

(k − kτ 2− k3)s3

6

+(...k − 3kτ

2− 3kτ τ − 6k2k)s4

24

N(0)

+

kτ s2

2+

(2kτ + kτ )s3

6

+(3kτ + 3kτ + kτ − kτ 3

− k3τ)s4

24

B(0) (23)

by using the Frenet–Serret relations to express T(0), T(0),...T(0),....

T (0) in terms of T(0),N(0), B(0) and inserting these expressionsinto the Taylor series. Then, for the second order CE algorithmwithcorrection, for example, from Eq. (1) we obtain

Ppi+1(d) = dT(0) +

kd2

2N(0)

Pr(d, s) = P4i+1(s) − Pp

i+1(d) =

[s −

k2s3

6−

kk8s4 − d

]T(0)

+

[ks2

2+

ks3

6+

k − kτ 2− k3

24s4 −

kd2

2

]N(0)

+

[kτ s3

6+

2kτ − kτ24

s4]B(0).

(24)

Since the normality condition F(d, s) = Pr(d, s) · T(s) = 0 istoo involved to allow an explicit solution for d(s) and the greatestaccuracy we can hope for can be no better than a fourth orderapproximation, d(s) was computed from the fourth order Taylorseries

d(s) = d(0) + d(0)s + d(0)s2

2+

...d(0)

s3

6+

....d (0)

s4

24. (25)

The derivative values were obtained by using Mathematica todifferentiate the normality condition F(d, s) = 0 symbolicallywithrespect to s and setting in the resulting expression F(d, s) = 0, s =

0, d(0) = 0 to obtain d(0) = 1, then differentiating F(d, s) = 0and setting in F(d, s) = 0, s = 0, d(0) = 0, d(0) = 1 to obtaind(0) = 0 and so forth for the remaining derivatives. The resultsare summarized in Table 1 and are valid for both plane and spacecurves.

Corrections are the terms beyond s, that is the quantities d(s)−swhich, when divided by 1t , can be regarded as general estimatesof the step feedrate error, when no correction is used. The CEalgorithms with correction proceed as before, except that d(s)rather than s is inserted in the chosen order of the CE to obtainPp

i+1.

8. Computational results

The proposed CE algorithms were tested for accuracy andefficiency on one half of a plane cardioid curve (Fig. 2(a)), definedparametrically by x = a cos u(1 + cos u), y = 2a sin u(1 +

cos u), a = 20 mm [24]. The cardioid was chosen for two reasons:(a) It possesses the expression s = 4a sin(0.5u) for the arc length,permitting an exact calculation of the percentage step magnitudeerror

e =

sp − sesp

× 100%, se = 4a[sin(0.5ui+1) − sin(0.5ui)] (26)

where ui, ui+1 are the parameter values associated with Pi andPi+1, sp is the prescribed and se is the actual local step. (b) As usweeps the interval 0 · · · π , the curvature of the cardioid increasesfrom an initial value of 3/(4a) all the way to infinity, allowing fulltesting of the effect of curvature on the step error.

Fig. 2(c) and (d) show the dependence of the step error on u/π ,for the first, second and third order CE algorithmswithout andwithcorrection, applied with a constant step size s = sp = 100 µm.Corrections were based on the single term correction formulaslisted in the right column of Table 1. These results can be comparedwith the step error versus u/π curves obtained with the existingparametric algorithms [9] (Fig. 2(e)). Fig. 2(f) shows the step errorprofiles for CE and parametric algorithms, when the programmedfeedrate is curvature dependent, according to the formula

υ =υo

1 + k(d − δ/2)(27)

where υo = 100 mm/s, d = 5 mm, δ = 0.3 mm. This feedratefunction is designed to keep constant the material removal rate ofa tool of radius d, engaged in the peripheral cutting of a curve ofcurvature k, with a cutting depth δ [7].

Clearly, in all cardioid tests, CE algorithms with correctionshow superior performance in terms of minimizing the step errorand consequently the feedrate error, compared to CE algorithmswithout correction and to the existing parametric algorithms ofthe same order. Computer times from these tests indicate thatCE algorithms with correction are about 40% more expensive,compared to parametric algorithms. Newton’s process required tosolve the point projection problem converged, on the average, to 6decimal precision in three iterations.

The remaining tests illustrate graphically the application of CEalgorithms to the interpolation of implicitly defined plane and 3Dcurves. These include the oval of Cassini (Fig. 2(b)), defined by theequation

f (x, y) = (x2 + y2 + a2)2 − 4a2x2 − b4 = 0, a = 5, b = 6 (28)

and the intersection of a sphere with a cylinder (Fig. 3), defined bythe system

f (x, y, z) = x2 + y2 + z2 = 402

g(x, y, z) = (x − 18)2 + (y − 20)2 = 162.(29)

The sphere–cylinder intersection was interpolated using therobust expressions (9) and (10) for k, T, B,N. The oval of Cassiniwas first interpolated using the recursive expressions (A.2.2)–(A.2.5) for y′, y′′, y′′′, y′′′′ and (3)–(5) for k, k, k, T, N, whichhold when x is the parameter, in order to study the numericalproblem associated with them. The condition fy = 0 causingthe problem manifested itself when x approached its maximumvalue x = 8.296, as an oscillating behavior in Newton’s iterations.This can be attributed to the tangent vector T = [1/s′, y′/s′]T(Eq. (5)), which maintains a strictly positive x-component,preventing it from turning in the opposite direction when x passesits maximum and starts decreasing, while the numerator y′

=

−fx/fy in the y-component of T oscillates wildly between large

S.G. Papaioannou, M.M. Patrikoussakis / Computer-Aided Design 43 (2011) 21–30 27

Fig. 2. (a)–(b) Generated cardioid and oval of Cassini. (c)–(f) Cardioid test results.

positive and negative values in the vicinity of the maximumx-value. The oval was interpolated successfully when the ruleproposed in Section 3 was enforced and again when k, k, T, Nwere computed from the robust expressions (6) and (7).

9. Conclusion

Wehave shown that the canonical equations (CE) of differentialgeometry provide a unifying framework for generating accuratetool paths in real time, suitable for high-speed CNC machining,with controlled feedrate. The generated paths can be composedof 2D or 3D curves in any common Cartesian representation(parametric, implicit or surface intersection). Extension to other

coordinate system types is possible, but was not pursued here. Ourcomputer results so far indicate that, when corrections are used,the proposed algorithms are more accurate in terms of feedratecompared to established parametric algorithms of the same order.They are also less efficient, but the difference in computer times ismodest, not enough to compromise their suitability for high-speedmachining.

Questions open to further research are the expression ofthe differential quantities k, τ , k, τ , k, T,N, B of the CL point’strajectory, in terms of corresponding quantities of the trajectoryof the cutter’s CC point, on a given base surface. Such expressionswould make it possible to interpolate the trajectory of the CL pointdirectly, using the CE. A more challenging problem is the 3D finish

28 S.G. Papaioannou, M.M. Patrikoussakis / Computer-Aided Design 43 (2011) 21–30

30

Fig. 3. (a) Sphere–cylinder intersection. (b) Generated intersection curve.

machining of free-form pocket boundaries, with various cuttergeometries.

Appendix

A.1. Computation of k, τ , k, τ , k, T,N, B for parametric curves

For curves defined parametrically by a position vector r =

[x(u), y(u), z(u)]T , a basic quantity appearing in all expressions isthe parametric speed

s′ =dsdu

= (x′2+ y′2

+ z ′2)1/2 = (r′ · r′)1/2 = |r′| (A.1.1)

where primes denote differentiations with respect to u. Thecurvature k and the torsion τ are computed by first using theoperator ′

=ddu = s′ d

ds to differentiate r successively and theFrenet–Serret equations

T = kNN = −kT + τB

B = −τN (A.1.2)

to substitute T, N, B in the resulting expressions. Then k and τ areisolated by appropriate vector operations on r′, r′′, r′′′:

r′ = s′T, r′′ = s′′T + ks′2N,

r′′′ = (s′′′ − s′3k2)T + (3s′s′′k + s′2k′)N + s′3kτB(A.1.3)

r′ × r′′ = s′3kB, r′ · (r′′ × r′′′) = s′6k2τ (A.1.4)

k =(r′ × r′′) · B

s′3, τ =

r′ · (r′′ × r′′′)s′6k2

(A.1.5)

T =r′

s′, B =

r′ × r′′

|r′ × r′′|=

r′ × r′′

s′3k, N = B × T. (A.1.6)

To compute the arc length derivatives of k, τ , expressions fors′′, s′′′ are needed

s′′ = ((r′ · r′)1/2)′ =r′ · r′′

s′, s′′′ =

r′′2 + r′ · r′′′ − s′′2

s′. (A.1.7)

Then,

k =k′

s′=

1s′

(r′ × r′′) · B

s′3

=(r′ × r′′′) · B − 3s′2s′′k

s′4

=r′′ · r′′′ − s′′s′′′ − 2s′3s′′k2

s′5k. (A.1.8)

The alternative expression for k not involving B is found by usingthe identity (a×b)(c×d) = (a · c)(b ·d)− (b · c)(a ·d), to reduce(r′ × r′′′) · B = (r′ × r′′′) (r′ × r′′)/s′3k, then finding the values ofthe resulting dot products from Eq. (A.1.3) and inserting them intothe expression. Similarly,

k =(k)′

s′=

1s′

k′

s′

=k′′

− s′′ks′2

. (A.1.9)

This expression involves k′′, which is computed by differentiatingk′

= s′k = [(r′ × r′′′) · B − 3s′2s′′k]/s′3 and simplifying to obtain

k′′=

((r′′ × r′′′) + (r′ × r′′′′)) · B − 3s′(2s′′2 + s′s′′′)k − 6s′3s′′k + s′5kτ 2

s′3.

Introduction of this expression into (A.1.9) yields

k =((r′′ × r′′′) + (r′ × r′′′′)) · B − 3s′(2s′′2 + s′s′′′)k

s′5

−7s′3s′′k − s′5kτ 2

s′5

=s′(r′′ · r′′′′) − s′′(r′ · r′′′′) − s′3(3s′′2 + 4s′s′′′)k2

s′7k

−6s′5s′′kk − s′7k2(k2 + τ 2)

s′7k. (A.1.10)

Finally, the arc length derivative of torsion is

τ =τ ′

s′

=s′kr′ · (r′′ × r′′′′) − (6s′′k + 2s′2k)r′ · (r′′ × r′′′)

s′8k3. (A.1.11)

These expressions hold for 3D parametric curves and planecurves (with the term involving τ dropped) and permit the useof up to fourth order CE. For plane curves, it is preferable to usefor k, k the expressions involving B, since this is then a constantvector, perpendicular to the plane of the curve and can be assignedthe value B = [0, 0, 1]T . The expressions for k, k, T,N then assumethe simple form

k =x′y′′

− x′′y′

s′3, k =

x′y′′′− x′′′y′

− 3s′2s′′ks′4

,

T =

[x′

s′,y′

s′

]T, N =

[−

y′

s′,x′

s′

]T. (A.1.12)

S.G. Papaioannou, M.M. Patrikoussakis / Computer-Aided Design 43 (2011) 21–30 29

All these expressions have some power of the parametricspeed s′ in the denominator. Generally s′ is strictly positive,except at singular points (cusps or self-intersections), wherex′(u), y′(u), z ′(u) vanish simultaneously, resulting in s′ = 0, acondition which makes the computed quantities infinitely large.Such points are difficult to cope with for any interpolationalgorithm, since there the curve tangent and consequently thedirection of interpolation is ill-defined. The curve is, therefore,assumed to be regular, that is contain no singular points.

A.2. Computation of y′, y′′, y′′′, y′′′′ for plane implicitly defined curves

All expressions in the previous section involve parametricderivatives x′, y′, z ′, x′′, y′′, z ′′, . . . of the coordinates, which musttherefore be computed before these expressions are applied to de-termine the local values of k, τ , k, τ , k, T,N, B, as required by theCE. For a parametric curve representation r = [x(u), y(u), z(u)]T ,the computation of parametric derivatives is straightforward. Inthis section we derive recursive expressions for computing para-metric derivatives up to fourth order, for plane curves defined im-plicitly as f (x, y) = 0.

Assuming that x is the free parameter so that x′= 1, x′′

=

x′′′= · · · = 0, we obtain successive derivatives of y by applying

the operator

′=

ddx

=∂

∂x+

∂ydydx

=∂

∂x+

∂yy′ (A.2.1)

first to the equation f (x, y) = 0, then to the resulting expressionsfor fx, fy, f ′

x , f ′y, f ′′

x , f ′′y . We assume, as is normally the case,

that higher order partial derivatives of f with respect to the samevariables are independent of the order of differentiation. Thus

f ′= fx + fyy′

= 0 → y′= −

fxfy

(A.2.2)

f ′

x = fxx + fxyy′, f ′

y = fxy + fyyy′,

y′′= −

fxfy

=fxf ′

y − f ′x fy

f 2y

(A.2.3)

f ′′

x = fxxx + 2fxxyy′+ fxyyy′2

+ fxyy′′,

f ′′

y = fxxy + 2fxyyy′+ fyyyy′2

+ fyyy′′

y′′′=

(fxf ′′y − f ′′

x fy)f2y − 2(fxf ′

y − f ′x fy)fyf

′y

f 4y(A.2.4)

f ′′′

x = fxxxx + 3(fxxxyy′+ fxxyyy′2

+ fxxyy′′

+ fxyyy′y′′) + fxyyyy′3+ fxyy′′′

f ′′′

y = fxxxy + 3(fxxyyy′+ fxyyyy′2

+ fxyyy′′+ fyyyy′y′′) + fyyyyy′3

+ fyyy′′′

y′′′′=

(f ′x f

′′y + fx f ′′′

y − f ′′′x fy − f ′′

x f′y)f

2y

f 4y

−4(fx f ′′

y − f ′′x fy)fyf ′

y + 2(fx f ′y − f ′

x fy)(3f′2y − fyf ′′

y )

f 4y. (A.2.5)

Expressions for x′, x′′, x′′′, x′′′′, which are required when y isused as the parameter, are easily inferred.

A.3. Computation of y′, z ′, y′′, z ′′, y′′′, z ′′′ for surface intersections

For the pure implicit representation f (x, y, z) = 0, g(x, y, z) =

0 of the intersecting surfaces, let X = (fygz − fzgy), Y = (fzgx −

fxgz), Z = (fxgy − fygx) be the components of the intersection’stangent vector ∇f × ∇g. Assuming x as the parameter, we obtain

y′, z ′ at Pi by differentiating the equations representing the curveand solving the resulting system f ′(x, y, z) = 0, g ′(x, y, z) = 0 fory′, z ′.

f ′(x, y, z) = fx + fyy′+ fzz ′

= 0,

g ′(x, y, z) = gx + gyy′+ gzz ′

= 0(A.3.1)

y′=

fzgx − fxgzfygz − fzgy

=YX

, z ′=

fxgy − fygxfygz − fzgy

=ZX

. (A.3.2)

Next, we differentiate (A.3.1) and solve the resulting system

f ′′(x, y, z) = c ′

f (y′, z ′) + fyy′′

+ fzz ′′= 0

g ′′(x, y, z) = c ′

g(y′, z ′) + gyy′′

+ gzz ′′= 0

c ′

f = fxx + fyyy′2+ fzzz ′2

+ 2(fxyy′+ fxzz ′

+ fyzy′z ′)

c ′

g = gxx + gyyy′2+ gzzz ′2

+ 2(gxyy′+ gxzz ′

+ gyzy′z ′)

(A.3.3)

to obtain

y′′=

fzc ′g − gzc ′

f

X, z ′′

=gyc ′

f − fyc ′g

X. (A.3.4)

Applying once more this process of differentiating the last system,and solving it for the derivatives of the next higher order, we find

y′′′=

fzc ′′g − gzc ′′

f

X, z ′′′

=gyc ′′

f − fyc ′′g

Xc ′′

f = fxxx + fyyyy′3+ fzzzz ′3

+ 3(fxxyy′+ fxxzz ′

+ fxyyy′2

+ fxzzz ′2+ fyyzy′2z ′

+ fyzzy′z ′2+ 2fxyzy′z ′

+ fxyy′′

+ fxzz ′′+ fyyy′y′′

+ fzzz ′z ′′+ fyz(y′′z ′

+ y′z ′′))

c ′′

g = gxxx + gyyyy′3+ gzzzz ′3

+ 3(gxxyy′+ gxxzz ′

+ gxyyy′2+ gxzzz ′2

+ gyyzy′2z ′+ gyzzy′z ′2

+ 2gxyzy′z ′+ gxyy′′

+ gxzz ′′+ gyyy′y′′

+ gzzz ′z ′′

+ gyz(y′′z ′+ y′z ′′)).

(A.3.5)

These recursive expressions, as well as those easily inferredfor x′, z ′, x′′, z ′′, x′′′, z ′′′ and for x′, y′, x′′, y′′, x′′′, y′′′ when y, respec-tively z, is used as parameter suffice for computing k, k, τ , T,N, Band applying the third order CE.

Similarly, for the pure parametric representation x = c(u, v),y = d(u, v), z = e(u, v) and x = f (r, t), y = g(r, t), z = h(r, t)of the intersecting surfaces, the curve is defined by the system ofequations c(u, v) − f (r, t) = 0, d(u, v) − g(r, t) = 0, e(u, v) −

h(r, t) = 0. Taking u as the parameter, we apply as before theprocess of successive differentiation and solution of this system forthe derivatives of the highest order. The first differentiation resultsin the system

cu + cvv′− fr r ′

− ft t ′ = 0, du + dvv′− gr r ′

− gt t ′ = 0,

eu + evv′− hr r ′

− ht t ′ = 0 (A.3.6)

which is solved for v′, r ′, t ′ and the solution is used to compute

x′= cu + cvv′, y′

= du + dvv′, z ′

= eu + evv′. (A.3.7)

The second differentiation yields the system

cuu + 2cuvv′− fur r ′

− frr r ′2− fut t ′ − ftt t ′2 + cvv′′

− fr r ′′− ft t ′′ = 0

duu + 2duvv′− gur r ′

− grr r ′2− gut t ′ − gtt t ′2 + dvv

′′

− gr r ′′− gt t ′′ = 0

euu + 2euvv′− hur r ′

− hrr r ′2− hut t ′ − htt t ′2 + evv

′′

− hr r ′′− ht t ′′ = 0 (A.3.8)

30 S.G. Papaioannou, M.M. Patrikoussakis / Computer-Aided Design 43 (2011) 21–30

which is solved for v′′, r ′′, t ′′ and these values are used to compute

x′′= cuu + 2cuvv′

+ cvv′′, y′′= duu + 2duvv′

+ dvv′′,

z ′′= euu + 2euvv′

+ evv′′, (A.3.9)

etc.

A.4. Convergence of Newton’s method

To derive a convergence condition of Newton’s iterations in thepoint projection problem, we assume a plane parametric curve,express the normality condition (Eq. (13)) in the local Frenet frame

h(s) = (xpl − x(s))x′(s) + (ypl − y(s))y′(s) = 0 (A.4.1)

and assume that h is parametrized in terms of s.A specific convergence condition can be derived from the

general condition |hh′′| < h′2 given in books on numerical

analysis [25].We only need to apply it at Pi (the origin of the Frenetframe) on the usual premise that, if it is satisfied at the startingpoint of Newton’s process, it will be satisfied at any subsequentpoint, on account of its closer position to the solution point. Inwhatfollows, we assume that Pp

i+1 = [xpl , ypl ]

T , which is a fixed point inthe context of Eq. (A.4.1), is derived from the third order CE, so that

xpl = s −k2s3

6, ypl =

ks2

2+

ks3

6. (A.4.2)

Since h is parametrized in terms of s, s′ = s = 1. Also at theorigin s = 0 and at any other point on the curve x2 + y2 = s2 =

1, xx + yy = 0. Then, (A.4.1) yields

h(s) = (xpl − x)x + (ypl − y)y

h(s) = (xpl − x)x + (ypl − y)y − (x2 + y2)

= (xpl − x)x + (ypl − y)y − 1

h(s) = (xpl − x)...x + (ypl − y)

...y.

(A.4.3)

The values of x, x,...x, y, y,

...y at the origin are obtained by applying

the Frenet–Serret relations (Eq. (A.1.2)) at Pi, as follows

T = [x, y]T = [1, 0]T → x = 1, y = 0

T = [x, y]T = kN = k[0, 1]T → x = 0, y = k

T = [...x,

...y]

T

= kN − k2T = k[0, 1]T − k2[1, 0]T →...x = −k2,

...y = k.

(A.4.4)

Writing (A.4.3) at the origin and introducing in them the values(A.4.4) and the expressions (A.4.2), we obtain

h(0) = xpl = s −k2

6s3

h(0) = kypl − 1 =k2

2s2 +

kk6s3 − 1

h(0) = −k2xpl + kypl = −k2s +kk2s2 +

k4 + k2

6s3.

(A.4.5)

The convergence condition |h(0)h(0)| < h(0)2, after some ma-nipulation and dropping of the higher order terms, yields s <√2/(2k) or

s < 0.707rk (A.4.6)

where rk is the radius of curvature. If we assume a minimumcurvature radius rkmin = 2 mm, a reasonable assumption formachined parts, then inequality (A.4.6) establishes a maximum al-lowable step size s = 1.414 mm, to ensure convergence. With asampling interval 1t = 1 ms, this corresponds to a maximum fee-drate value υ = s/1t = 1.414 m/s, proving that the convergencecondition (A.4.6) is satisfied even in high-speed machining.

References

[1] Suh SH, Cho JH, Hong HD. On the architecture of intelligent STEP-compliantCNC. Int J Comput Integer Manuf 2002;15(2):168–77.

[2] Hardwick M, Loffredo D. Lessons learned implementing STEP-NC AP-238. IntJ Comput Integer Manuf 2006;19(6):523–32.

[3] Yang DCH, Kong T. Parametric interpolator versus linear interpolator forprecision CNC machining. Comput Aided Des 1994;26(3):225–33.

[4] Spithalni M, Koren Y, Lo CC. Realtime curve interpolators. Comput Aided Des1994;26(11):832–8.

[5] Farouki RT, Shah S. Real-time CNC interpolators for Pythagorean-hodographcurves. Comput Aided Geom Design 1996;13:583–600.

[6] Farouki RT, Tsai Y-F, Yuan G-F. Contour machining of free-form surfaces withreal-time PH curve CNC interpolators. Comput Aided Geom Design 1998;16:61–76.

[7] Farouki RT, Manjunathaiah J, Nicholas D, Yuan G-F, Jee S. Variable-feedrateCNC interpolators for constant material removal rates along Pythagorean-hodograph curves. Computer Aided Des 1998;30(8):631–40.

[8] Farouki RT, Manjunathaiah J, Yuan G-F. G Codes for the specification ofPythagorean-hodograph tool paths and associated feedrate functions onopen-architecture CNC machines. Int J Mach Tools Manuf 1999;39:123–42.

[9] Farouki RT, Tsai YF. Exact Taylor series coefficients for variable-feedrate CNCcurve interpolators. Comput Aided Des 2001;33(2):155–65.

[10] Farouki RT. Pythagorean-hodograph curves, algebra and geometry insepara-ble. Springer; 2008.

[11] Willmore TJ. Differential geometry. Oxford Univ. Press; 1959.[12] Lipschutz MM. Theory and problems of differential geometry. Schaum’s

Outline Series, McGraw Hill; 1969.[13] Hartmann E. G2 interpolation and blending on surfaces. Vis Comput 1996;

12(4):181–92.[14] Ye X, Maekawa T. Differential geometry of intersection curves of two surfaces.

Comput Aided Geom Design 1999;16(8):767–88.[15] Goldman R. Curvature formulas for implicit curves and surfaces. Comput

Aided Geom Design 2005;22:632–58.[16] Patrikalakis NM, Maekawa T. Shape interrogation for computer aided design

and manufacturing. Springer; 2002.[17] Choi BK, Jerard RB. Sculptured surface machining. Kluwer Acad Publ.; 1998.[18] Lin RS, Koren Y. Efficient tool-path planning for machining free-form surfaces.

Trans ASME, J Eng Ind 1996;118:20–8.[19] Choi YK, Banerjie A. Tool path generation and tolerance analysis for free-form

surfaces. Int J Mach Tools Manuf 2007;47:689–96.[20] Pratt MJ. Geometric methods for CAD. In: Piegl LA, editor. Fundamental

developments of computer-aided geometric modeling. Acad Press; 1993.[21] Farouki R, Tsai YF, Yuan GF. Contour machining free-form surfaces with

real-time PH curve CNC interpolators. Comput Aided Geom Design 1999;16:61–76.

[22] Tam HY, Xu H, Zhou Z. Iso-planar interpolation for the machining of implicitsurfaces. Comput Aided Des 2002;34:125–36.

[23] Pratt MJ, Geisow AD. Surface/surface intersection problems. In: Gregory JA,editor. The mathematics of surfaces. Oxford Univ. Press; 1986.

[24] Lawrence JD. A catalog of special plane curves. Dover; 1972.[25] Scarborough JB. Numerical mathematical analysis. Johns Hopkins Press;

1966.