farouki presentation
TRANSCRIPT
Introduction to Pythagorean-hodograph curves
Rida T. Farouki
Department of Mechanical & Aeronautical Engineering,University of California, Davis
geometry and computing 11
ISBN 978-3-540-73397-3
Rida T. Farouki
Pythagorean-Hodograph Curves Algebra and Geometry Inseparable
Pythagorean-Hodograph Curves Farouki
By virtue of their special algebraic structures, Pythagorean-hodograph (PH) curves offer unique advantages for computer-aided design and manufacturing, robotics, motion control, path planning, computer graphics, animation, and related fields. This book offers a comprehensive and self-contained treatment of the mathematical theory of PH curves, including algorithms for their construction and examples of their practical applications. Special features include an emphasis on the interplay of ideas from algebra and geometry and their historical origins, detailed algorithm descriptions, and many figures and worked examples. The book may appeal, in whole or in part, to mathematicians, computer scientists, and engineers.
geometry and computing
ISBN 978-3-540-73397-3 (2008) 728 pp. + 204 illustrations
Pythagoras, tyrant of Selinunte
a2
b2
c2a
b
c
It is hard to let go of Pythagoras. He has meant so much to so manyfor so long. I can with confidence say to readers of this essay: mostof what you believe, or think you know, about Pythagoras is fiction,much of it deliberately contrived.
M. F. Burnyeat, London Review of Books (2007)
May 17, 1990 . . . . . . . . . . . . . . . May 17, 2010
— a truly remarkable 20-year coincidence —
rational arc-length parameterization is impossible
Theorem. It is impossible to parameterize any plane curve,other than a straight line, by rational functions of its arc length.
rational parameterization r(t) = (x(t), y(t)) =⇒ curve points canbe exactly computed by a finite sequence of arithmetic operations
arc length parameterization r(t) = (x(t), y(t)) =⇒ equal parameterincrements ∆t generate equidistantly spaced points along the curve
simple result but subtle proof — Pythagorean triples of polynomials,integration of rational functions, and calculus of residues
R. T. Farouki and T. Sakkalis (1991), Real rational curves are not “unit speed,”Comput. Aided Geom. Design 8, 151–157
R. T. Farouki and T. Sakkalis (2007), Rational space curves are not “unit speed,”Comput. Aided Geom. Design 24, 238–240
T. Sakkalis, R. T. Farouki, and L. Vaserstein (2009), Non–existence of rational arc lengthparameterizations for curves in R
n, J. Comp. Appl. Math. 228, 494–497
arc length parameterization by rational functions?
rational parameterization
t
+ – ! ÷
(x,y)
arc–length parameterization
"s = "t
"s
"t
rational arc-length parameterization?
x(t) =X(t)W (t)
, y(t) =Y (t)W (t)
with gcd(W,X, Y ) = 1 , W (t) �= constant
x�2(t) + y�2(t) ≡ 1 ⇒ (WX � −W �X)2 + (WY � −W �Y )2 ≡ W 4
Pythagorean triple ⇒ (x�, y�) =�
u2 − v2
u2 + v2,
2uv
u2 + v2
�
are x(t) =�
u2 − v2
u2 + v2dt , y(t) =
�2uv
u2 + v2dt both rational?
f(t)g(t)
=N�
i=1
mi�
j=1
Cij
(t− zi)j+
Cij
(t− zi)j
Ci1 = residuet=zi
f(t)g(t)
,
�f(t)g(t)
dt is rational ⇐⇒ Ci1 = Ci1 = 0
� +∞
−∞
f(t)g(t)
dt = 2πi�
Im(zi)>0
residuef(t)g(t)
����t=zi
rational indefinite integral ⇐⇒ zero definite integral
proof by contradiction: x(t) =�
u2 − v2
u2 + v2dt , y(t) =
�2uv
u2 + v2dt
assume both rational with u(t), v(t) �≡ 0 and gcd(u, v) = 1
choose α, β so that deg(αu + βv)2 < deg(u2 + v2)�
(αu + βv)2
u2 + v2dt = 1
2(α2 − β2) x(t) + αβ y(t) + 1
2(α2 + β2) t is rational
⇒� +∞
−∞
(αu + βv)2
u2 + v2dt = 0 ⇒ [α u(t) + β v(t) ]2
u2(t) + v2(t)≡ 0
contradicts u(t), v(t) �≡ 0 or gcd(u, v) = 1
parametric speed of curve r(ξ)
σ(ξ) = |r�(ξ)| =ds
dξ= derivative of arc length s w.r.t. parameter ξ
=�
x�2(ξ) + y�2(ξ) for plane curve=
�x�2(ξ) + y�2(ξ) + z�2(ξ) for space curve
σ(ξ) ≡ 1 — i.e., s ≡ ξ — for arc-length or “natural” parameterization,but impossible for any polynomial or rational curve except a straight line
irrational nature of σ(ξ) has unfortunate computational implications:
• arc length must be computed approximately by numerical quadrature
• unit tangent t, normal n, curvature κ, etc, not rational functions of ξ
• offset curve rd(ξ) = r(ξ) + dn(ξ) at distance d must be approximated
• requires approximate real-time CNC interpolator algorithms, for motionalong r(ξ) with given speed (feedrate) V = ds/dt
curves with “simple” parametric speed
Although σ(ξ) = 1 is impossible, we can gain significant advantagesby considering curves for which the argument of
�x�2(ξ) + y�2(ξ) or�
x�2(ξ) + y�2(ξ) + z�2(ξ) is a perfect square — i.e., polynomial curveswhose hodograph components satisfy the Pythagorean conditions
x�2(ξ) + y�2(ξ) = σ2(ξ) or x�2(ξ) + y�2(ξ) + z�2(ξ) = σ2(ξ)
for some polynomial σ(ξ). To achieve this, the Pythagorean structuremust be built into the hodograph a priori, by a suitable algebraic model.
planar PH curves — Pythagorean structure of r�(t) achieved throughcomplex variable model
spatial PH curves — Pythagorean structure of r�(t) achieved throughquaternion or Hopf map models
higher dimenions or Minkowski metric — Clifford algebra formulation
a
bc
a, b, c = real numbers
choose any a, b → c =�
a2 + b2
a, b, c = integers
a2 + b2 = c2 ⇐⇒
a = (u2 − v2)wb = 2uvw
c = (u2 + v2)w
a(t), b(t), c(t) = polynomials
a2(t) + b2(t) ≡ c2(t) ⇐⇒
a(t) = [ u2(t)− v2(t) ] w(t)b(t) = 2 u(t)v(t)w(t)
c(t) = [ u2(t) + v2(t) ] w(t)
K. K. Kubota, Amer. Math. Monthly 79, 503 (1972)
hodograph of curve r(t) = derivative r�(t)
curve
velocity vectors
hodograph
Pythagorean structure: x�2(t) + y�2(t) = σ2(t) for some polynomial σ(t)
Pythagorean-hodograph (PH) curves
r(t) is a PH curve in Rn ⇐⇒ coordinate components of r�(t)
are elements of a “Pythagorean (n + 1)-tuple of polynomials”
PH curves exhibit special algebraic structures in their hodographs
• rational offset curves rd(t) = r(t) + dn(t)
• polynomial arc-length function s(t) =� t
0|r�(τ)| dτ
• closed-form evaluation of energy integral E =� 1
0κ2 ds
• real–time CNC interpolators, rotation-minimizing frames, etc.
generalize PH curves to non-Euclidean metrics & other functional forms
planar offset curves
plane curve r(t) = (x(t), y(t)) with unit normal n(t) =(y�(t),−x�(t))�x�2(t) + y�2(t)
offset at distance d defined by rd(t) = r(t) + dn(t)
• defines center–line tool path, in order to cut a desired profile
• defines tolerance zone characterizing allowed variations in part shape
• defines erosion & dilation operators in mathematical morphology,image processing, geometrical smoothing procedures, etc.
• offset curves typically approximated in CAD systems
• PH curves have exact rational offset curve representations
offsets to Pythagorean–hodograph (PH) curves
offset
PH curves
polynomial curves
rational curves
algebraic curves
Left: untrimmed offsets obtained by sweeping a normal vector of lengthd around the original curve (including approrpiate rotations at vertices).Right: trimmed offsets, obtained by deleting certain segments of the
untrimmed offsets, that are not globally distance d from the given curve.
offset curve trimming procedure
Left: self-intersections of the untrimmed offset. Right: trimmed offset,after discarding segments between these points that fail the distance test.
Bezier control polygons of rational offsets offsets exact at any distance
intricate topology of parallel (offset) curves
"innocuous" curve
y = x4
offset distance = 14 cusps, 6 self–intersections
offset distance< dcrit = dcrit > dcrit
offset curve geometry governed by Huygens’ principle (geometrical optics)
polynomial arc length function s(ξ)
for a planar PH curve of degree n = 2m + 1 specified byr�(ξ) = (x�(ξ), y�(ξ)) = (u2(ξ)− v2(ξ), 2u(ξ)v(ξ)) where
u(ξ) =m�
k=0
uk
�m
k
�(1− ξ)m−kξk , v(ξ) =
m�
k=0
vk
�m
k
�(1− ξ)m−kξk ,
the parametric speed can be expressed in Bernstein form as
σ(ξ) = |r�(ξ)| = u2(ξ) + v2(ξ) =2m�
k=0
σk
�2m
k
�(1− ξ)2m−kξk ,
where σk =min(m,k)�
j=max(0,k−m)
�m
j
��m
k − j
�
�n− 1
k
� (ujuk−j + vjvk−j) .
The cumulative arc length s(ξ) is then the polynomial function
s(ξ) =� ξ
0σ(τ) dτ =
n�
k=0
sk
�n
k
�(1− ξ)n−kξk ,
of the curve parameter ξ, with Bernstein coefficients given by
s0 = 0 and sk =1n
k−1�
j=0
σj , k = 1, . . . , n .
Hence, the total arc length S of the curve is simply
S = s(1)− s(0) =σ0 + σ1 + · · ·+ σn−1
n,
and the arc length of any segment ξ ∈ [ a, b ] is s(b)− s(a). The result isexact, as compared to the approximate numerical quadrature required
for “ordinary” polynomial curves.
inversion of arc length function — find parameter value ξ∗at which arc length has a given value s∗ — i.e., solve equation
s(ξ∗) = s∗
note that s is monotone-increasing with ξ (since σ = ds/dt ≥ 0 )and hence this polynomial equation has just one (simple) real root
— easily computed to machine precision by Newton-Raphson iteration
Example: uniform rendering of a PH curve — for given arc-lengthincrement ∆s,find parameter values ξ1, . . . , ξN such that
s(ξk) = k ∆s , k = 1, . . . , N .
With initial approximation ξ(0)k = ξk−1 + ∆s/σ(ξk−1), use Newton iteration
ξ(r+1)k = ξ(r)
k −s(ξ(r)
k )
σ(ξ(r)k )
, r = 0, 1, . . .
Values ξ1, . . . , ξN define motion at uniform speed along a curve— simplest case of a broader class of problems addressed byreal–time interpolator algorithms for digital motion controllers.
exact arc lengths
S = 8
S = 22/3
uniform arc–length rendering
!s = constant
!t = constant
planar PH curves — complex variable model
x�2(t) + y�2(t) = σ2(t) ⇐⇒
x�(t) = h(t) [u2(t)− v2(t) ]y�(t) = 2 h(t)u(t)v(t)σ(t) = h(t) [u2(t) + v2(t) ]
usually choose h(t) = 1 to define a primitive hodograph
gcd(u(t), v(t)) = 1 ⇐⇒ gcd(x�(t), y�(t)) = 1
if deg(u(t), v(t)) = m, defines planar PH curve of odd degree n = 2m + 1
planar PH condition automatically satisfied using complex polynomials
w(t) = u(t) + i v(t) maps to r�(t) = w2(t) = u2(t)− v2(t) + i 2u(t)v(t)
→ formulation of efficient complex arithmetic algorithmsfor the construction and analysis of planar PH curves
summary of planar PH curve properties
• planar PH cubics are scaled, rotated, reparameterized segments of aunique curve, Tschinhausen’s cubic (caustic for reflection by parabola)
• planar PH cubics characterized by intuitive geometrical constraints onBezier control polygon, but not sufficiently flexible for free-form design
• planar PH quintics are excellent design tools — can inflect, and matchfirst–order Hermite data by solving system of three quadratic equations
• select “good” interpolant from multiple solutions using shape measure— arc length, absolute rotation index, elastic bending energy
• generalizes to C2 PH quintic splines smoothly interpolating sequenceof points p0, . . . ,pN — efficient complex arithmetic algorithms
• theory & algorithms for planar PH curves have attained a mature stageof development
curves with two-sided rational offsets
W. Lu (1995), Offset-rational parametric plane curves, Comput. Aided Geom. Design 12, 601–616
parabola r(t) = (t, t2) is simplest example
t =s2 − 16
16 s: s ∈ (−∞, 0)
s ∈ (0,+∞)
�→ t ∈ (−∞,+∞)
defines a “doubly-traced” rational re-parameterization
two-sided offset rd(s) = r(s)± dn(s) =�
Xd(s)Wd(s)
,Yd(s)Wd(s)
�is rational :
Xd(s) = 16 (s4 + 16d s3 − 256d s− 256) s ,
Yd(s) = s6 − 16s4 − 2048d s3 − 256s2 + 4096 ,
Wd(s) = 256 (s2 + 16) s2 .
offset is algebraic curve of degree 6 with implicit equation
fd(x, y) = 16 (x2 + y2) x4 − 8 (5x2 + 4y2) x2y
− (48d2 − 1) x4 − 32 (d2 − 1) x2y2 + 16 y4
+ [ 2 (4d2 − 1) x2 − 8 (4d2 + 1) y2 ] y
+ 4 d2(12d2 − 5) x2 + (4d2 − 1)2y2
+ 8 d2(4d2 + 1) y − d2(4d2 + 1)2 = 0
genus = 0 ⇒ 12(n− 1)(n− 2) = 10 double points
one affine node + six affine cusps“non–ordinary” double point at infinity with
double points in first & second neighborhoods
generalized complex form (Lu 1995)
h(t) = real polynomial, w(t) = u(t) + i v(t) = complex polynomial
polynomial PH curve r(t) =�
h(t)w2(t) dt
two-sided rational offset curve r(t) =�
(k t + 1) h(t)w2(t) dt
h(t) = 1 and w(t) = 1 → parabola
h(t) linear and w(t) = 1 → cuspidal cubic
k = 0 and h(t) = 1 → regular PH curve
describes all polynomial curves with rational offsets
characterization of spatial Pythagorean hodographs
R. T. Farouki and T. Sakkalis, Pythagorean–hodograph space curves, Advances in ComputationalMathematics 2, 41–66 (1994)
x�2(t) + y�2(t) + z�2(t) = σ2(t) ⇐=
x�(t) = u2(t)− v2(t)− w2(t)y�(t) = 2 u(t)v(t)z�(t) = 2 u(t)w(t)σ(t) = u2(t) + v2(t) + w2(t)
only a sufficient condition — not invariant with respect to rotations in R3
R. Dietz, J. Hoschek, and B. Juttler, An algebraic approach to curves and surfaces on the sphereand on other quadrics, Computer Aided Geometric Design 10, 211–229 (1993)
H. I. Choi, D. S. Lee, and H. P. Moon, Clifford algebra, spin representation, and rationalparameterization of curves and surfaces, Advances in Computational Mathematics 17, 5-48 (2002)
x�2(t) + y�2(t) + z�2(t) = σ2(t) ⇐⇒
x�(t) = u2(t) + v2(t)− p2(t)− q2(t)y�(t) = 2 [u(t)q(t) + v(t)p(t) ]z�(t) = 2 [ v(t)q(t)− u(t)p(t) ]σ(t) = u2(t) + v2(t) + p2(t) + q2(t)
spatial PH curves — quaternion & Hopf map models
quaternion model (H→ R3) A(t) = u(t) + v(t) i + p(t) j + q(t)k
→ r�(t) = A(t) iA∗(t) = [u2(t) + v2(t)− p2(t)− q2(t) ] i
+ 2 [ u(t)q(t) + v(t)p(t) ] j + 2 [ v(t)q(t)− u(t)p(t) ]k
Hopf map model (C2 → R3) α(t) = u(t) + i v(t), β(t) = q(t) + i p(t)
→ (x�(t), y�(t), z�(t)) = (|α(t)|2 − |β(t)|2, 2Re(α(t)β(t)), 2 Im(α(t)β(t)))
equivalence — identify “i” with “i” and set A(t) = α(t) + kβ(t)
both forms invariant under general spatial rotation by θ about axis n
summary of spatial PH curve properties
• all spatial PH cubics are helical curves — satisfy a · t = cos α(where a = axis of helix, α = pitch angle) and κ/τ = constant
• spatial PH cubics characterized by intuitive geometrical constraintson Bezier control polygons
• spatial PH quintics well-suited to free-from design applications— two-parameter family of interpolants to first-order Hermite data
• optimal choice of free parameters is a rather subtle problem— one parameter controls curve shape, the other total arc length
• generalization to spatial C2 PH quintic splines is problematic— too many free parameters!
• many interesting subspecies — helical polynomial curves,“double” PH curves, rational rotation-minimizing frame curves, etc.
special classes of spatial PH curves
helical polynomial space curves
satisfy a · t = cos α (a = axis, α = pitch angle) and κ/τ = tan α
all helical polynomial curves are PH curves (implied by a · t = cos α)all spatial PH cubics are helical, but not all PH curves of degree ≥ 5
“double” Pythagorean–hodograph (DPH) curves
r�(t) and r�(t)× r��(t) both have Pythagorean structures— have rational Frenet frames (t,n,b) and curvatures κ
all helical polynomial curves are DPH — not just PH — curvesall DPH quintics are helical, but not all DPH curves of degree ≥ 7
rational rotation–minimizing frame (RRMF) curves
rational frames (t,u,v) with angular velocity satisfying ω · t ≡ 0
RRMF curves are of minimum degree 5 (proper subset of PH quintics)identifiable by quadratic (vector) constraint on quaternion coefficients
useful in spatial motion planning and rigid–body orientation control
Frenet
RMF
rational Pythagorean-hodograph curves
J. C. Fiorot and T. Gensane (1994), Characterizations of the set of rational parametric curves with rationaloffsets, in Curves and Surfaces in Geometric Design AK Peters, 153–160
H. Pottmann (1995), Rational curves and surfaces with rational offsets, Comput. Aided Geom. Design12, 175–192
• employs dual representation — plane curve regarded as envelopeof tangent lines, rather than point locus
• offsets to a rational PH curve are of the same degree as that curve
• admist natural generalization to rational surfaces with rational offsets
• parametric speed, but not arc length, is a rational function of curveparameter (rational functions do not, in general, have rational integrals)
• geometrical optics interpretation — rational PH curves are causticsfor reflection of parallel light rays by rational plane curves
• Laguerre geometry model — oriented contact of lines & circles
rational unit normal to planar curve r(t) =�
X(t)W (t)
,Y (t)W (t)
�
nx(t) =2a(t)b(t)
a2(t) + b2(t), ny(t) =
a2(t)− b2(t)a2(t) + b2(t)
equation of tangent line at point (x, y) on rational curve
�(x, y, t) = nx(t) x + ny(t) y − f(t)g(t)
= 0
envelope of tangent lines — solve �(x, y, t) =∂�
∂t(x, y, t) = 0
for (x, y) and set x = X(t)/W (t), y = Y (t)/W (t) to obtain
W = (a2 + b2)(a�b− ab�)g2 ,
X = 2ab(a�b− ab�)fg − 12(a
4 − b4)(f �g − fg�) ,
Y = (a2 − b2)(a�b− ab�)fg + ab(a2 + b2)(f �g − fg�) .
dual representation in line coordinates K(t), L(t), M(t) is simpler
define set of all tangent lines to rational PH curve by
K(t) W + L(t) X + M(t) Y = 0
line coordinates are given in terms a(t), b(t) and f(t), g(t) by
K : L : M = − (a2 + b2)f : 2abg : (a2 − b2)g
for rational PH curves, class (= degree of line representation)is less than order (= degree of point representation)
dual Bezier representation — control points replaced by control lines
rational offsets constructed by parallel displacement of control lines
medial axis transform of planar domain
medial axis = locus of centers of maximal inscribed disks, touchingdomain boundary in at least two points; medial axis transform (MAT)
= medial axis + superposed function specifying radii of maximal disks
Minkowski Pythagorean-hodograph (MPH) curves
H. P. Moon (1999), Minkowski Pythagorean hodographs, Comput. Aided Geom. Design 16, 739–753
(x(t), y(t), r(t)) = medial axis transform (MAT) of planar domain D
characterizes domain D as union of one-parameter familyof circular disks C(t) with centers (x(t), y(t)) and radii r(t)
recovery of domain boundary ∂D as envelope of one–parameterfamily of circular disks specified by the MAT (x(t), y(t), r(t))
xe(t) = x(t) − r(t)r�(t)x�(t)±
�x�2(t) + y�2(t)− r�2(t) y�(t)x�2(t) + y�2(t)
,
ye(t) = y(t) − r(t)r�(t)y�(t)∓
�x�2(t) + y�2(t)− r�2(t) x�(t)x�2(t) + y�2(t)
.
for parameterization to be rational, MAT hodograph must satisfy
x�2(t) + y�2(t) − r�2(t) = σ2(t)
— this is a Pythagorean condition in the Minkowski space R(2,1)
metric of Minkowski space R(2,1) has signature + +− rather
than usual signature + + + for metric of Euclidean space R3
Moon (1999): sufficient–and–necessary characterization ofMinkowski Pythagorean hodographs in terms of four polynomials
u(t), v(t), p(t), q(t)
x�(t) = u2(t) + v2(t)− p2(t)− q2(t) ,
y�(t) = 2 [ u(t)p(t)− v(t)q(t) ] ,
r�(t) = 2 [ u(t)v(t)− p(t)q(t) ] ,
σ(t) = u2(t)− v2(t) + p2(t)− q2(t) .
interpretation of Minkowski metric
originates in special relativity: distance d between events withspace–time coordinates (x1, y1, t1) and (x2, y2, t2) is defined by
d2 = (x2 − x1)2 + (y2 − y1)2 − c2(t2 − t1)2
space-like if d real, light-like if d = 0, time-like if d imaginary
distance between circles (x1, y1, r1) and (x2, y2, r2) as points in R(2,1)
d2 = (x2 − x1)2 + (y2 − y1)2 − (r2 − r1)2
d
d = 0
d imaginary
rational boundary reconstructed from MPH curve
x
yr
closure
• advantages of PH curves: rational offset curves, exact arc–lengthcomputation, real-time CNC interpolators, exact rotation–minimizingframes, bending energies, etc.
• applications of PH curves in digital motion control, path planning,robotics, animation, computer graphics, etc.
• investigation of PH curves involves a wealth of conceptsfrom algebra and geometry with a long and fascinating history
• many open problems remain: optimal choice of degrees of freedom,C2 spline formulations, control polygons for design of PH splines,deeper geometrical insight into quaternion representation, etc.
Hermite and spline interpolation algorithms forplanar & spatial Pythagorean-hodograph curves
Rida T. Farouki
Department of Mechanical & Aeronautical Engineering,University of California, Davis
— synopsis —
• motivation for Hermite & spline interpolation algorithms
• planar PH quintic Hermite interpolants (four solutions)
• computing absolute rotation index & elastic bending energy
• a priori identification of “good” Hermite interpolant
• planar C2 PH quintic splines — numerical methods
• spatial PH quintic Hermite interpolants (2 free parameters)
• spatial PH quintics — taxonomy of special types
• spatial C2 PH quintic splines — residual freedoms
motivation for Hermite & spline interpolation algorithms
• only cubic PH curves characterizable by simple constraintson Bezier control polygons
• planar PH cubics = Tschirnhausen’s cubic,spatial PH cubics = {helical cubic space curves }— too limited for general free–form design applications
• construct quintic PH curves “geometrically” by interpolationof discrete data — points, tangents, etc.
• non–linear interpolation equations made tractable bycomplex number model for planar PH curves, andquaternion or Hopf map model for spatial PH curves
• efficient algorithms allow interactive design of PH curves
Pythagorean triples of polynomials
x�2(t) + y�2(t) = σ2(t) ⇐⇒
x�(t) = u2(t)− v2(t)y�(t) = 2 u(t)v(t)σ(t) = u2(t) + v2(t)
K. K. Kubota, Pythagorean triples in unique factorization domains, American Mathematical Monthly79, 503–505 (1972)
R. T. Farouki and T. Sakkalis, Pythagorean hodographs, IBM Journal of Research and Development34 736–752 (1990)
R. T. Farouki, The conformal map z → z2 of the hodograph plane, Computer Aided Geometric Design11, 363–390 (1994)
complex number model for planar PH curves
choose complex polynomial w(t) = u(t) + i v(t)
→ planar Pythagorean hodograph r�(t) = (x�(t), y�(t)) = w2(t)
planar PH quintic Hermite interpolants
R. T. Farouki and C. A. Neff, Hermite interpolation by Pythagorean–hodograph quintics,Mathematics of Computation 64, 1589–1609 (1995)
complex representation: hodograph = [ complex quadratic polynomial ] 2
r�(t) = [w0(1− t)2 + w12(1− t)t + w2t2 ] 2
r(t) =�
r�(t) dt =5�
k=0
pk
�5k
�(1− t)5−k
tk
complex Hermite data — r�(0) = d0, r�(1) = d1, r(1)− r(0) = ∆p
→ three quadratic equations in three complex variables w0, w1, w2
w20 = d0 , w2
2 = d1 , w20 + w0w1 +
2w21 + w2w0
3+ w1w2 + w2
2 = 5∆p
generically four distinct interpolants to given Hermite data d0, d1, ∆p
one good solution among four PH quintic interpolants —other three typically exhibit undesired “looping” behavior
obtain Bezier control points of PH quintic from w0, w1, w2
p1 = p0 +w2
0
5,
p2 = p1 +w0w1
5,
p3 = p2 +2w2
1 + w0w2
15,
p4 = p3 +w1w2
5,
p5 = p4 +w2
2
5.
four distinct PH quintic Hermite interpolants
+ + + –
– + – –
blue = PH quintic, red = “ordinary” cubic
choosing the “good” interpolant — rotation index
absolute rotation index: Rabs =12π
�|κ| ds
w.l.o.g. take r(0) = 0 and r(1) = 1 (shift + scale of Hermite data)
r�(t) = k [ (t− a)(t− b) ]2
solve for k, a, b instead of w0, w1, w2
locations of a, b relative to [ 0, 1 ] gives Rabs :
Rabs =∠ 0a 1 + ∠ 0b 1
π(no inflections)
Rabs =1π
N�
k=0
|∠ tk a tk+1 − ∠ tk b tk+1 |
Computation of absolute rotation index Rabs from locations of the complexhodograph roots a, b relative to t ∈ [ 0, 1 ]. The best interpolant ariseswhen a, b lie on opposite sides of (and are not close to) this interval.
choosing the “good” interpolant — bending energy
U =�
κ2 ds =
� |r� × r��|2
σ5dt
use complex form r�(t) = w2(t) with w(t) = k(t− a)(t− b) again
analytic reduction of indefinite integral
U(t) =4
|k|2
�2 Re(a1) ln |t− a| + 2Re(b1) ln |t− b|
− 2 Im(a1) arg(t− a) − 2 Im(b1) arg(t− b)
− Re�
2a2
t− a+
2b2
t− b+
a3
(t− a)2+
b3
(t− b)2
� �.
a1,b1,a2,b2,a3,b3 = coefficients in partial fraction expansion of integrand
total bending energy of PH quintic E = U(1)− U(0)
compare PH quintic & “ordinary” cubic interpolants
good PH quintic interpolants (blue) to first-order Hermite data typicallyhave lower bending energy than “ordinary” cubic interpolants (red)
C2 spatial Hermite interpolants:B. Juttler, C2 Hermite interpolation by Pythagorean hodograph curves of degree seven,Mathematics of Computation 70, 1089–1111 (2001)
monotone–curvature PH quintic segments
D. J. Walton and D. S. Meek, A Pythagorean–hodograph quintic spiral, Computer Aided Design28, 943–950 (1996)
R. T. Farouki, Pythagorean–hodograph quintic transition curves of monotone curvature,Computer Aided Design 29, 601–606 (1997)
k = 3.50 k = 3.75 k = 4.00
G2 blends between a line and a circle, defined by PH quintics of monotonecurvature (the Bezier control polygons of the PH quintics are also shown)— the free parameter k controls the rate of increase of the curvature.
a priori identification of “good” interpolant
H. P. Moon, R. T. Farouki, and H. I. Choi, Construction and shape analysis of PH quintic Hermiteinterpolants, Computer Aided Geometric Design 18, 93–115 (2001)
H. I. Choi, R. T. Farouki, S. H. Kwon, and H. P. Moon, Topological criterion for selection of quinticPythagorean–hodograph Hermite interpolants, Computer Aided Geometric Design 25, 411–433 (2008)
if the end derivatives d0, d1 lie in complex–plane domain D defined by
D = {d | Re(d) > 0 and |d| < 3 }
— i.e., they point in the direction of ∆p and have magnitudescommensurate with |∆p|, the “good” PH quintic corresponds to
the ++ choice of signs in the solution procedure
criterion for “good” solution — absence of anti–parallel tangentsrelative to the “ordinary” cubic Hermite interpolant
construction of C2 PH quintic splinesversus “ordinary” C2 cubic splines
• both incur global system of equations in three consecutive unknowns
• both require specification of end conditions to complete the equations
• equations for “ordinary” cubic splines arise from C2 continuity conditionat each interior node, while equations for PH quintic splines arise frominterpolating consecutive points pi, pi+1
• “ordinary” cubic splines incur linear equations in real variables, butPH quintic splines incur quadratic equations in complex variables
• coordinate components of “ordinary” cubic splines weakly coupledthrough nodal parameter values; components of PH quintic splinesstrongly coupled through PH property
• linearity of “ordinary” cubic splines ⇒ unique interpolant andspline basis methods, but non–linear nature of PH quintic splines⇒ multiplicity of solutions and no linear superposition
planar C2 PH quintic spline equations
problem: construct C2 piecewise–PH–quintic curve interpolating givensequence of points p0, . . . ,pN ∈ R2
using complex representation of planar PH quintics, write hodograph ofsegment ri(t) between pi−1 and pi, as square of a complex quadratic:
r�i(t) = [ 12(zi−1 + zi)(1− t)2 + zi 2(1− t)t + 1
2(zi + zi+1)t2 ]2
⇒ ri(t) and ri+1(t) automatically satisfy C1 and C2 conditions at theirjuncture pi = ri(1) = ri+1(0) — namely,
r�i(1) = r�i+1(0) = 14(zi + zi+1)2, r��i (1) = r��i+1(0) = (zi+1 − zi)(zi + zi+1)
writing ∆pi = pi − pi−1, the end–point interpolation condition
� 1
0r�i(t) dt = ∆pi
yields for i = 1, . . . , N the equations
fi(z1, . . . , zN) = 3 z2i−1 + 27 z2
i + 3 z2i+1 + zi−1zi+1
+ 13 zi−1zi + 13 zizi+1 − 60 ∆pi = 0
in the N complex variables z1, . . . zN . First & last equations modified usingchosen end conditions to avoid reference to undefined variables z0, zN+1.
possible choices for end conditions
• specified end derivatives — r�1(0) = d0 and r�N(1) = dN
• cubic (Tschirnhaus) end spans — r1(t), rN(t) are just PH cubics
• periodic end conditions — set r�N(1) = r�1(0) and r��N(1) = r��1(0)for a closed C2 curve with pN = p0
• no analog of not–a–knot condition for “ordinary” C2 cubic splines
solution method #1 — homotopy scheme
G. Albrecht and R. T. Farouki, Construction of C2 Pythagorean–hodograph interpolating splines bythe homotopy method , Advances in Computational Mathematics 5, 417–442 (1996)
the non–linear system to be solved: fi(z1, . . . , zN) = 0 , 1 ≤ i ≤ N
“initial” system with known solutions: gi(z1, . . . , zN) = 0 , 1 ≤ i ≤ N
“continuously deform” initial system into desired system whiletracking all solutions as homotopy parameter λ increases from 0 to 1
hi(z1, . . . , zN ,λ) = λ fi(z1, . . . , zN) + (1− λ) eiφ gi(z1, . . . , zN) = 0
2N+k non-singular solution loci (z1, . . . , zN ,λ) ∈ CN × R for “almost all” φ
predictor-corrector method
trace from λ = 0 to 1 loci defined by hi(z1, . . . , zN ,λ) = 0, 1 ≤ i ≤ N
tridiagonal Jacobian matrix: Mij =∂hi
∂zj, 1 ≤ i, j ≤ N
predictor step : motion along tangent directions to solution lociN�
j=1
Mij ∆zj = (eiφ gi − fi) ∆λ , i = 1, . . . , N
corrector step : correct for curvature of loci by Newton iterations
z(r+1)j = z(r)
j + δzj for j = 1, . . . , N , r = 1, 2, . . .
whereN�
j=1
M(r)ij δzj = − h(r)
i , i = 1, . . . , N
untilN�
i=1
|hi(z(r)1 , . . . , z(r)
N ,λ + ∆λ) |2 ≤ �2
0.0 0.2 0.4 0.6 0.8 1.00
200
400
600
!
0
100
200
300
400
500
600
700
typical behavior of �f�2, �g�2, �h�2 norms in predictor–corrector scheme
• well–conditioned — accuracy near machine precision achievable
• gives complete set of 2N+k distinct PH quintic spline interpolants(k = −1, 0,+1 depends on chosen end conditions)
• unique good interpolant — without undesired “looping” behavior
• better shape (curvature distribution) than “ordinary” C2 cubic spline
• becomes computationally very expensive for large N
complete set of PH quintic spline interpolants
shape measures for identifying “good” interpolant:
total arc length, absolute rotation index, elastic bending energy
S =�
ds , Rabs =12π
�|κ| ds , E =
�κ
2 ds
comparison of PH quintic & “ordinary” cubic splines
0 1 2 3 4 5 6 7 8 9–4
0
4
8
12
16
20
t
!
blue = C2 PH quintic spline, red = “ordinary” C2 cubic spline
solution method #2 — Newton-Raphson iteration
R. T. Farouki, B. K. Kuspa, C. Manni, and A. Sestini, Efficient solution of the complex quadratictridiagonal system for C2 PH quintic splines, Numerical Algorithms 27, 35–60 (2001)
in applications, we want to compute only the “good” PH quintic spline
apply Newton-Raphson iteration to system fi(z1, . . . , zN) = 0 , 1 ≤ i ≤ N
recall that Jacobian matrix Mij =∂ fi∂ zj
, 1 ≤ i, j ≤ N is tridiagonal
in rows i = 2, . . . , N − 1, the only non–zero elements are
Mi,i−1 = 6 zi−1 + 13 zi + zi+1 ,
Mii = 13 zi−1 + 54 zi + 13 zi+1 ,
Mi,i+1 = zi−1 + 13 zi + 6 zi+1 .
rows i = 1 and i = N are modified to reflect the chosen end conditions
writing z = (z1, . . . , zN)T and f = (f1, . . . , fN)T , the Newton–Raphsoniterations may be expressed as
z(r+1) = z(r) + δz(r), r = 0, 1, 2, . . .
where δz(r) = (δz(r)1 , . . . , δz(r)
N )T is the solution of the linear system
M(r)δz(r) = − f (r)
.
superscripts on M and f indicate evaluation at z(r) = (z(r)0 , . . . , z(r)
N ).
key step: find “sufficiently close” initial approximation z(0) = (z(0)1 , . . . , z(0)
N )
Kantorovich theorem: guaranteed convergence under verifiable conditions
choice of starting approximation
critical to successful Kanotorovich test & rapid convergence of iterations
strategy: equate mid–point derivatives of PH quintic spline to (known)mid–point derivatives of “ordinary” cubic spline that interpolates the samedata points p0, . . . ,pN
yields a tridiagonal linear system for starting values z1, . . . , zN
zi−1 + 6zi + zi+1 = 4�
6∆pi − (di−1 + di) , i = 1, . . . , N
where d0, . . . ,dN are the nodal derivatives of the “ordinary” cubic spline,and equations i = 1 and i = N are adjusted for the chosen end conditions
strategy is nearly infallible for smoothly–varying data points p0, . . . ,pN
efficiency of Newton-Raphson method
tridiagonal equations for NR increments δz(r) — O(N) solution cost —and quadratic convergence of the NR iterations =⇒ extremely efficientconstruction of large–N PH quintic splines
shape N + 1 homotopy method Newton–Raphsonkidney 10 8.09 sec 0.11 secsquiggly 15 656.21 sec 0.12 secquirky 19 1128.97 sec 0.23 secbig open 35 0.40 secbig closed 38 0.43 sec
Timing comparisons for C2 PH quintic spline test curves
big_open big_closed
C2 PH quintic splines computed by Newton–Raphson method for large N
design of C2 PH splines by control polygons
F. Pelosi, M. L. Sampoli, R. T. Farouki, and C. Manni, A control polygon scheme for design of planarC2 PH quintic spline curves, Computer Aided Geometric Design 24, 28–52 (2007)
desire a control–polygon approach to constructing PH splines, thatmimics the familiar and useful properties of cubic B–spline curves
non–linear nature of PH curves =⇒ there is no spline basis for them
strategy: control polygon defines a “hidden” interpolation problem forPH splines, to be solved by efficient Newton–Raphson method
C2 PH quintic spline curve associated with a given control polygon andknot sequence is defined to be the “good” interpolant to the nodal pointsof the ordinary C2 cubic spline curve with the same B–spline controlpoints, knot sequence, and end conditions
comparison of the “ordinary” cubic B–spline (red) and PH quintic spline(blue) curves defined by given control polygons and knot sequences
computation sufficiently fast for interactive modification of polygons
multiple knots may be introduced to reduce the continuity to C1 or C0
linear precision & local modification capability possible with double knots
. . . the three Russian brothers . . .
. . . Following the collapse of the former Soviet Union, theeconomy in Russia hit hard times, and jobs were difficult tofind. Dmitry, Ivan, and Alexey — the Brothers Karamazov —therefore decided to seek their fortunes by emigrating toAmerica, England, Australia . . .
Pythagorean quartuples of polynomials
x�2(t) + y�2(t) + z�2(t) = σ2(t) ⇐⇒
x�(t) = u2(t) + v2(t)− p2(t)− q2(t)y�(t) = 2 [u(t)q(t) + v(t)p(t) ]z�(t) = 2 [ v(t)q(t)− u(t)p(t) ]σ(t) = u2(t) + v2(t) + p2(t) + q2(t)
R. Dietz, J. Hoschek, and B. Juttler, An algebraic approach to curves and surfaces on the sphereand on other quadrics, Computer Aided Geometric Design 10, 211–229 (1993)
R. T. Farouki and T. Sakkalis, Pythagorean–hodograph space curves, Advances in ComputationalMathematics, 2 41–66 (1994)
H. I. Choi, D. S. Lee, and H. P. Moon, Clifford algebra, spin representation, and rationalparameterization of curves and surfaces, Advances in Computational Mathematics 17, 5-48 (2002)
quaternion model for spatial PH curves
choose quaternion polynomial A(t) = u(t) + v(t) i + p(t) j + q(t)k
→ spatial Pythagorean hodograph r�(t) = (x�(t), y�(t), z�(t)) = A(t) iA∗(t)
fundamentals of quaternion algebra
quaternions are four-dimensional numbers of the form
A = a + ax i + ay j + az k and B = b + bx i + by j + bz k
that obey the sum and (non-commutative) product rules
A + B = (a + b) + (ax + bx) i + (ay + by) j + (az + bz)k
AB = (ab− axbx − ayby − azbz)
+ (abx + bax + aybz − azby) i
+ (aby + bay + azbx − axbz) j
+ (abz + baz + axby − aybx)k
basis elements 1, i, j, k satisfy i2 = j2 = k2 = i j k = −1
equivalently, i j = − j i = k , j k = −k j = i , k i = − i k = j
scalar-vector form of quaternions
set A = (a,a) and B = (b,b) — a, b and a, b are scalar and vector parts(a, b and a,b also called the real and imaginary parts of A,B)
A + B = ( a + b , a + b )
AB = ( ab− a · b , ab + ba + a× b)
(historical note: Hamilton’s quaternions preceded, but were eventuallysupplanted by, the 3-dimensional vector analysis of Gibbs and Heaviside)
A∗ = (a,−a) is the conjugate of A
modulus : |A|2 = A∗A = AA∗ = a2 + |a|2
note that |AB | = |A| |B| and (AB)∗ = B∗A∗
unit quaternions & spatial rotations
any unit quaternion has the form U = (cos 12θ, sin
12θ n)
describes a spatial rotation by angle θ about unit vector n
for any vector v the quaternion product
v = U vU∗
yields the vector v corresponding to a rotation of v by θ about n
here v is short-hand for a “pure vector” quaternion V = (0,v)
unit quaternions U form a (non-commutative) group under multiplication
quaternion model for spatial PH curves
quaternion polynomial A(t) = u(t) + v(t) i + p(t) j + q(t)k
maps to r�(t) = A(t) iA∗(t) = [u2(t) + v2(t)− p
2(t)− q2(t) ] i
+ 2 [ u(t)q(t) + v(t)p(t) ] j + 2 [ v(t)q(t)− u(t)p(t) ]k
rotation invariance of spatial PH form: rotate by θ about n = (nx, ny, nz)
define U = (cos 12θ, sin
12θ n) — then r�(t) → r�(t) = A(t) i A∗(t)
where A(t) = U A(t) (can interpret as rotation in R4)
solution of “fundamental” quaternion equation
for any given vector v, find quaternions A satisfying A iA∗ = v
such quaternions A map the unit vector i onto the given vector vby means of a scaling–rotation transformation
write v =v|v| = (λ, µ, ν) — obtain one–parameter family of solutions
A =
�(1 + λ)|v|
2
�− sinφ + cos φ i +
µ cos φ + ν sinφ
1 + λj +
ν cos φ− µ sinφ
1 + λk�
where φ = free angular variable
more compact from — A =�|v|n exp(φ i)
where exp(φ i) = cos φ + sinφ i and n =i + v| i + v | = bisector of i, v
spatial PH quintic Hermite interpolants
spatial PH quintic interpolating end points pi, pf & derivatives di, df
r�(t) = A(t) iA∗(t) , A(t) = A0(1− t)2 + A12(1− t)t + A2t2
→ three equations in three quaternion unknowns A0, A1, A2
r�(0) = A0 iA∗0 = di and r�(1) = A2 iA∗
2 = df
� 1
0A(t) iA∗(t) dt = 1
5 A0 iA∗0 + 1
10(A0 iA∗1 + A1 iA∗
0)
+ 130(A0 iA∗
2 + 4A1 iA∗1 + A2 iA∗
0)
+ 110(A1 iA∗
2 + A2 iA∗1) + 1
5 A2 iA∗2 = pf − pi
• two–parameter family of solutions for given data pi, pf and di, df
3 variables φ0,φ1,φ2 but interpolants depend only on differences
examples of spatial PH quintic Hermite interpolants
pi = (0, 0, 0) and pf = (1, 1, 1) for both curvesdi = (−0.8, 0.3, 1.2) and df = (0.5,−1.3,−1.0) for curve on left,
di = (0.4,−1.5,−1.2) and df = (−1.2,−0.6,−1.2) for curve on right
choosing free parameters φ0, φ2 (set φ1 = 0 w.l.o.g.)
R. T. Farouki, C. Giannelli, C. Manni, and A. Sestini, Identification of spatial PH quintic Hermiteinterpolants with near–optimal shape measures, Computer Aided Geometric Deisgn 25, 274–297 (2008)
total arc length depends only on difference φ2 − φ0 of two parameters
⇒ one–parameter family of Hermite interpolants with identical arc lengths
the Hermite interpolants of extremal arc length are helical PH curves
minimization of elastic energy E =�
κ2 ds (computation intensive)
several efficient empirical measures for determining “optimal” φ0, φ2
One–parameter families of spatial PH quintic interpolants, of identical arclength, defined by keeping φ2 − φ0 constant, and varying only 1
2(φ0 + φ2)
taxonomy of “special spatial” PH curves
helical polynomial space curves
curve tangent t makes a constant angle α with a fixed unit vector a— i.e., a · t = cos α (a = axis of helix, α = pitch angle)
equivalently, curve has constant curvature–torsion ratio: κ/τ = tan α
all helical polynomial curves are PH curves (implied by a · t = cos α)
all spatial PH cubics are helical, but not all PH curves of degree ≥ 5
“double” Pythagorean–hodograph (DPH) curves
components of both r�(t) & r�(t)× r��(t) satisfy Pythagorean conditions
DPH curves have rational Frenet frames (t,n,b) and curvatures κ
all helical polynomial curves must be DPH — not just PH — curves
all DPH quintics are helical, but not all DPH curves of degree ≥ 7
rational rotation–minimizing frame (RRMF) curves
rational adapted frames (t,u,v) with angular velocity satisfying ω · t ≡ 0
RRMF curves are of minimum degree 5 (proper subset of PH quintics)
identifiable by quadratic (vector) constraint on quaternion coefficients
useful in spatial motion planning and rigid–body orientation control
construction through geometric Hermite interpolation algorithm
Frenet
RMF
rational rotation-minimizing rigid body motions
R. T. Farouki, C. Giannelli, C. Manni, A. Sestini (2010), Design of rational rotation–minimizing rigid bodymotions by Hermite interpolation, Math. Comp., submitted
• interpolate end points pi, pf and frames (ti,ui,vi) and (tf ,uf ,vf) byPH quintic r(ξ) with rational rotation-minimizing frame (t(ξ),u(ξ),v(ξ))
• RRMF condition for spatial PH quintics: A1 iA∗1 = A0 iA∗
2 + A2 iA∗0
• satisfying RRMF condition & end frame interpolation always possible— end point interpolation requires positive root of degree 6 equation
• diverse applications — to robotics, animation, spatial path planning,geometric sweeping operations, etc.
spatial C2 PH quintic splines
• quaternion and Hopf map models for spatial C2 PH quintic splinecurves interpolating sequence of points p0, . . . ,pN ∈ R3 both incurone residual freedom per spline segment
• shape of spline interpolant sensitive to choice of free parameters
• early study — fix freedoms using “quaternion matching” condition
• optimize shape measure — e.g., proximity to a single PH cubic —to provide control-polygon-based design scheme
• specify arc lengths of spline segments as multiples of chord lengths,∆sk = γk |pk − pk−1| — for γ1 = · · · = γN (= γ, say) we can use γ
as a single tension parameter to alter interpolant shape
closure
• advantages of PH curves: rational offset curves, analytic real-timeinterpolators, exact bending energy, rotation-minimizing frames, etc.
• complex number and quaternion models are “natural” formulationsfor planar and spatial PH curves — rotation invariance, geometricalinsight, simplified construction algorithms, etc.
• for planar PH curves, efficient & robust Hermite and spline interpolationalgorithms are available for practical use
• for spatial PH curves, basic Hermite interpolation algorithm availablewith methods for “optimal” selection of two free parameters
• open problems for spatial PH curves — choice of multiple freeparameters in C2 spline formulation; geometric Hermite interpolationwith RRMF curves; applications of rotation–minimizing frames inmotion planning, animation, spatial orientation control, etc.
Rotation-minimizing frames on space curves— theory, algorithms, applications
Rida T. Farouki
Department of Mechanical & Aeronautical Engineering,University of California, Davis
(in collaboration with C. Giannelli, C. Y. Han, C. Manni, T. Sakkalis, A. Sestini)
— synopsis —
• rotation-minimizing frames (RMFs) on space curves
• applications of RMFs — “defects” of the Frenet frame
• RMFs for spatial Pythagorean–hodograph (PH) curves
• characterization of PH curves with exact rational RMFs
• a “philosophical” interlude — theory versus practice
• directed frames — camera orientation controlcomputation of rotation-minimizing directed frames
• polar differential geometry — anti-hodograph,Frenet directed frame, polar curvature and torsion
• conclusions and practical advice on standard answersto questions asked at conferences
rotation-minimizing frames on space curves
• an adapted frame (e1, e2, e3) on a space curve r(ξ) is a system ofthree orthonormal vectors, such that e1 = r�/|r�| is the curve tangentand (e2, e3) span the curve normal plane at each point
• on any given space curve, there are infinitely many adapted frames— the Frenet frame is perhaps the most familiarR. L. Bishop (1975), There is more than one way to frame a curve, Amer. Math. Monthly 82, 246–251
• for a rotation–minimizing frame (RMF), the normal–plane vectors(e2, e3) exhibit no instantaneous rotation about e1
F. Klok (1986), Two moving coordinate frames for sweeping along a 3D trajectory,Comput. Aided Geom. Design 3, 217–229
• angular orientation of RMF relative to Frenet frame = integral ofcurve torsion w.r.t. arc length (⇒ one–parameter family of RMFs)H. Guggenheimer (1989), Computing frames along a trajectory,Comput. Aided Geom. Design 6, 77–78
• spatial PH curves admit exact evaluation of torsion integral,but expression for RMF contains transcendental termsR. T. Farouki (2002), Exact rotation–minimizing frames for spatial Pythagorean–hodograph curves,Graphical Models 64, 382–395
• piecewise–rational RMF approximation on polynomial & rational curvesB. Juttler and C. Maurer (1999), Rational approximation of rotation minimizing frames usingPythagorean–hodograph cubics, J. Geom. Graphics 3, 141–159R. T. Farouki and C. Y. Han (2003), Rational approximation schemes for rotation–minimizing frameson Pythagorean–hodograph curves, Comput. Aided Geom. Design 20, 435–454
• Euler–Rodrigues frame (ERF) is better reference than Frenet framefor identifying curves with rational RMFs (RRMF curves)H. I. Choi and C. Y. Han (2002), Euler–Rodrigues frames on spatial Pythagorean–hodograph curves,Comput. Aided Geom. Design 19, 603–620
ERF = rational adapted frame defined on spatial PH curves that isnon–singular at inflection points
• “implicit” algebraic condition for rational RMFs on spatial PH curves— no rational RMFs for non–degenerate cubicsC. Y. Han (2008), Nonexistence of rational rotation–minimizing frames on cubic curves,Comput. Aided Geom. Design 25, 298–304
• sufficient–and–necessary conditions on Hopf map coefficients ofspatial PH quintics for rational RMFR. T. Farouki, C. Giannelli, C. Manni, A. Sestini (2009), Quintic space curves with rationalrotation–minimizing frames, Comput. Aided Geom. Design 26, 580–592
• simplified (quadratic) RRMF conditions for quaternion and Hopf maprepresentations of spatial PH quinticsR. T. Farouki (2010), Quaternion and Hopf map characterizations for the existence of rationalrotation–minimizing frames on quintic space curves, Adv. Comp. Math., to appear
• general RRMF conditions for spatial PH curves of any degreeR. T. Farouki and T. Sakkalis (2010), Rational rotation–minimizing frames on polynomialspace curves of arbitrary degree, J. Symb. Comp., to appear
• spatial motion design by RRMF quintic Hermite interpolationR. T. Farouki, C. Giannelli, C. Manni, A. Sestini (2010), Design of rational rotation–minimizingrigid body motions by Hermite interpolation, Math. Comp., submitted
elementary differential geometry of space curves
Frenet frame (t(ξ),n(ξ),b(ξ)) on space curve r(ξ) defined by
t =r�
|r�| , n =r� × r��
|r� × r��| × t , b =r� × r��
|r� × r��|
x y
z
t defines instantaneous direction of motion along curve;n points toward center of curvature; b = t× n completes frame
variation of frame (t(ξ),n(ξ),b(ξ)) along curve r(ξ)specified in terms of parametric speed, curvature, torsion functions
σ = |r�| , κ =| r� × r��|
|r�|3 , τ =(r� × r��) · r���
| r� × r��|2
by Frenet–Serret equations
t�n�b�
= σ
0 κ 0
−κ 0 τ0 −τ 0
tnb
• (t,n) span osculating plane (second–order contact at each point)
• (n,b) span normal plane (cuts curve orthogonally at each point)
• (b, t) span rectifying plane (envelope of these planes definesrectifying developable, allows curve to be flattened onto a plane)
“defects” of Frenet frame on space curves
• (t,n,b) do not depend rationally on curve parameter ξ
• normal–plane vectors (n,b) become indeterminate andcan suddenly “flip” at inflection points of curve, where κ = 0
• exhibits “unnecessary rotation” in the curve normal plane
dtds
= d× t ,dnds
= d× n ,dbds
= d× b
Darboux vector d = κb + τ t = Frenet frame rotation rate
component τ t describes instantaneous rotation in normal plane(unnecessary for “smoothly varying” adapted orthonormal frame)
total curvature |d| =√
κ2 + τ2 = angular velocity of Frenet frame
rotation–minimizing adapted frame (t,u,v) satisfying
dtds
= ω × t ,duds
= ω × u ,dvds
= ω × v
RMF characteristic property — angular velocity ω satisfies ω · t ≡ 0
no instantaneous rotation of normal–plane vectors (u,v) about tangent t
→ rotation–minimizing frame much better than Frenet frame forapplications in animation, path planning, swept surface constructions, etc.
among all adapted frames on a space curve, the RMF identifiesleast elastic energy associated with twisting (as distinct from bending)
Frenet frame (center) & rotation-minimizing frame (right) on space curve
motion of an ellipsoid oriented by Frenet & rotation-minimizing frames
Frenet ERF RMF
sudden reversal of Frenet frame through an inflection point
surface constructed by sweeping an ellipse along a space curveusing Frenet frame (center) & rotation-minimizing frame (right)
Pythagorean-hodograph (PH) curves
r(ξ) = PH curve in Rn ⇐⇒ coordinate components of r�(ξ)
elements of “Pythagorean (n + 1)-tuple of polynomials”
PH curves incorporate special algebraic structures in their hodographs(complex number & quaternion models for planar & spatial PH curves)
• rational offset curves rd(ξ) = r(ξ) + dn(ξ)
• polynomial arc-length function s(ξ) =
� ξ
0|r�(ξ)| dξ
• closed-form evaluation of energy integral E =
� 1
0κ2
ds
• real-time CNC interpolators, rotation-minimizing frames, etc.
Pythagorean quartuples of polynomials
x�2(t) + y�2(t) + z�2(t) = σ2(t) ⇐⇒
x�(t) = u2(t) + v2(t)− p2(t)− q2(t)
y�(t) = 2 [u(t)q(t) + v(t)p(t) ]
z�(t) = 2 [ v(t)q(t)− u(t)p(t) ]
σ(t) = u2(t) + v2(t) + p2(t) + q2(t)
H. I. Choi, D. S. Lee, and H. P. Moon, Clifford algebra, spin representation, and rationalparameterization of curves and surfaces, Advances in Computational Mathematics 17, 5-48 (2002)
quaternion representation A(t) = u(t) + v(t) i + p(t) j + q(t)k
→ spatial Pythagorean hodograph r�(t) = (x�(t), y�(t), z�(t)) = A(t) iA∗(t)
Hopf map representation α(t) = u(t) + i v(t), β(t) = q(t) + i p(t)
→ (x�(t), y�(t), z�(t)) = (|α(t)|2 − |β(t)|2, 2Re(α(t)β(t)), 2 Im(α(t)β(t)))
equivalence — identify “i” with “i” and set A(t) = α(t) + kβ(t)
rotation-minimizing frames on spatial PH curves
new basis in normal plane
�uv
�=
�cos θ sin θ
− sin θ cos θ
� �nb
�
where θ = −�
τ ds : cancels “unnecessary rotation” in normal plane
free integration constant =⇒ ∃ one–parameter family of RMFs
options for construction of RMF (t,u,v) on spatial PH quintics:
• analytic reduction — involves rational function integration,logarithmic dependence on curve parameter
• rational approximation — use Pade (rational Hermite) approach:simple algorithm & rapid convergence
• exact rational RMFs — identify sufficient and necessary conditionsfor rational RMFs on spatial PH curves
comparison of Frenet & rotation-minimizing frames
spatial PH quintic Frenet frame rotation–minimizing frame
rotation rates — RMF vs Frenet frame
0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.00
1
2
3
t
rate
of r
otat
ion
rotation minimizingFrenet frame
compared with the rotation-minimizing frame (t,u,v), the Frenet frame(t,n,b) exhibits a lot of “unnecessary” rotation (in the curve normal plane)
rational RMFs on spatial PH curves
any space curve with a rational RMF must be a PH curve(since only PH curves have rational unit tangents)
Choi & Han (2002): for PH curve with hodograph r�(ξ) = A(ξ) iA∗(ξ)
t(ξ) =A(ξ) iA∗(ξ)
|A(ξ)|2 , p(ξ) =A(ξ) jA∗(ξ)
|A(ξ)|2 , q(ξ) =A(ξ)kA∗(ξ)
|A(ξ)|2
defines the Euler–Rodrigues frame (ERF) — (t,p,q) is better “reference”than Frenet frame (t,n,b) for seeking rational RMFs on spatial PH curves
ERF is not intrinsic (depends on chosen basis (i, j,k) for R3)— but is inherently rational and non–singular at inflection points
RMF vectors (u,v) must be obtainable from ERF vectors (p,q)
through rational rotation in curve normal plane at each point of r(ξ)
seek rational rotation ERF → RMF
Han (2008): is there a rational rotation in the normal planedefined by two real polynomials a(ξ), b(ξ) that maps theERF vectors p(ξ), q(ξ) onto the RMF vectors u(ξ), v(ξ)?
u(ξ) =a2(ξ)− b2(ξ)
a2(ξ) + b2(ξ)p(ξ) − 2 a(ξ)b(ξ)
a2(ξ) + b2(ξ)q(ξ) ,
v(ξ) =2 a(ξ)b(ξ)
a2(ξ) + b2(ξ)p(ξ) +
a2(ξ)− b2(ξ)
a2(ξ) + b2(ξ)q(ξ) .
if such polynomials a(ξ), b(ξ) exist, we have an RRMF curve— i.e., a PH curve with a rational rotation–minimizing frame
“implicit” algebraic condition for RRMF curves
Han (2008): PH curve defined by A(ξ) = u(ξ) + v(ξ) i + p(ξ) j + q(ξ)kis an RRMF curve if and only if polynomials a(ξ), b(ξ) exist such that
uv� − u�v − pq� + p�q
u2 + v2 + p2 + q2=
ab� − a�b
a2 + b2
Hopf map representation with α(ξ) = u(ξ) + i v(ξ), β(ξ) = q(ξ) + i p(ξ)
requires existence of complex polynomial w(ξ) = a(ξ) + i b(ξ) such that
αα� −α�α + ββ� − β�β
|α|2 + |β|2 =ww� −w�w
|w|2
Han (2008): no RRMF cubics exist, except degenerate (planar) curves
characterization of RRMF quintics
Farouki, Giannelli, Manni, Sestini (2009): use Hopf map form with
α(t) = α0 (1− t)2 + α1 2(1− t)t + α2 t2 ,
β(t) = β0 (1− t)2 + β1 2(1− t)t + β2 t2 .
defines RRMF quintic ⇐⇒ w0,w1,w2 ∈ C, γ ∈ R exist such that
|α0|2 + |β0|2 = γ |w0|2 ,
α0α1 + β0β1 = γ w0w1 ,
α0α2 + β0β2 + 2 (|α1|2 + |β1|2) = γ (w0w2 + 2 |w1|2) ,
α1α2 + β1β2 = γ w1w2 ,
|α2|2 + |β2|2 = γ |w2|2 .
NOTE: can take w0 = 1 without loss of generality
sufficient–and–necessary conditions
Proposition 1. A PH quintic has a rational rotation–minimizing frame ifand only if the coefficients α0,α1,α2 and β0,β1,β2 of the two quadraticcomplex polynomials α(t) and β(t) satisfy the constraints
(|α0|2 + |β0|2) |α1α2 + β1β2|2 = (|α2|2 + |β2|2) |α0α1 + β0β1|2 ,
(|α0|2 + |β0|2) (α0β2 −α2β0) = 2 (α0α1 + β0β1)(α0β1 −α1β0) .
one real + one complex constraint on α0,α1,α2 and β0,β1,β2
⇒ RRMF quintics have three less freedoms than general PH quintics
Algorithm to construct RRMF quintics: freely choose α0,α2 and β0,β2
& obtain α1,β1 in terms of one free parameter, from RRMF constraints
example RRMF quintic construction
choose α0 = 1 + 2 i , β0 = −2 + i , α2 = 2− i , β2 = −1 + 2 i
=⇒ α1 =1 + i√
2, β1 =
−3 + i√2
and (w0,w1,w2) =
�1,
1√2,3− 4 i
5
�
Frenet
ERF
RMF
polynomials defining RMF vectors (u,v) in terms of ERF vectors (p,q)
a(t) = (1− t)2 +1√2
2(1− t)t +3
5t2 , b(t) = − 4
5t2 .
0.0 0.2 0.4 0.6 0.8 1.00
1
2
3
4
t
angu
lar s
peed
!
ERF
RMF
comparison of angular speeds for ERF and RMF
“lingering doubts” about RRMF quintic conditions
• constraints are of rather high degree — 4 and 6
• not invariant when “0” and “2” subscripts swapped(corresponds to the re–parameterization t→ 1− t)
• do not easily translate to quaternion representation
problem revisited in Farouki (2010), to appear
• to avoid asymmetry, do not assume w0 = 1
• consider PH quintics in canonical form with r�(0) = (1, 0, 0)
• strategic switching between quaternion & Hopf map forms
improved sufficient–and–necessary conditions
Proposition 2. A spatial PH quintic defined by the quaternion polynomialA0(1− ξ)2 + A12(1− ξ)ξ + A2 ξ2 has a rational RMF if and only if
A0 iA∗2 + A2 iA∗
0 = 2A1 iA∗1 .
Proposition 3. A spatial PH quintic defined by the complex polynomialsα0(1− ξ)2 + α12(1− ξ)ξ + α2 ξ2 and β0(1− ξ)2 + β12(1− ξ)ξ + β2 ξ2 hasa rational RMF if and only if
Re(α0α2 − β0β2) = |α1|2 − |β1|2 , α0β2 + α2β0 = 2 α1β1 .
• new conditions are only quadratic in coefficients
• easy transformation quaternion � Hopf map forms
• obvious invariance on swapping “0” and “2” subscripts
RRMF quintics constructed from new conditions
Frenet
ERF
RMF
Frenet
ERF
RMF
rational RMFs on space curves of any degree
R. T. Farouki and T. Sakkalis (2010), Rational rotation–minimizing frames on polynomial space curvesof arbitrary degree, Journal of Symbolic Computation, to appear
Proposition 4. For A(t) = u(t) + v(t) i + p(t) j + q(t)k, the condition
uv� − u�v − pq� + p�q
u2 + v2 + p2 + q2=
ab� − a�b
a2 + b2
can be satisfied if and only if a polynomial h(t) exists, such that
(uv� − u�v − pq� + p�q)2 + (uq� − u�q − vp� + v�p)2
= h(u2+ v2
+ p2+ q2
) .
Polynomial ρ = (uv� − u�v − pq� + p�q)2 + (uq� − u�q − vp� + v�p)2 plays akey role in the theory of double PH curves, with |r�(t)| and |r�(t)× r��(t)|both polynomials in t — rational Frenet frames and rational curvatures.
theory versus practice — a “philosophical” interlude
theoretical astronomer —don’t believe an observation until there’s a theory to explain it
observational astronomer —don’t believe a theory until there’s an observation to confirm it
“In theory, there is no difference between theory and practice.In practice, there is.”
Yogi BerraYankees baseball player,
aspiring philosopher
famous sayings of Yogi Berra, sportsman-philosopher
• Baseball is ninety percent mental,and the other half is physical.
• Always go to other people’s funerals— otherwise they won’t come to yours.
• It was impossible to get a conversation going,everyone was talking too much.
• You better cut the pizza into four pieces,because I’m not hungry enough to eat six.
• You got to be very careful if you don’t know whereyou are going, because you might not get there.
• Nobody goes there anymore. It’s too crowded.
adapted & directed frames on space curve r(ξ)
• adapted frame (e1, e2, e3) ⇒ e1 is the unit curve tangent, t = r�/|r�|
• infinitely many choices of normal plane vectors e2, e3 orthogonal to t
• angular velocity ω of rotation-minimizing adapted frame (e1, e2, e3)
is characterized by ω · t ≡ 0
• directed frame (e1, e2, e3) ⇒ e1 is the unit polar vector, o = r/|r|
• infinitely many choices of image plane vectors e2, e3 orthogonal to o
• angular velocity ω of rotation-minimizing directed frame (e1, e2, e3)
is characterized by ω · o ≡ 0
rotation-minimizing directed frames — applications
R. T. Farouki and C. Giannelli (2009), Spatial camera orientation control by rotation–minimizing directedframes, Computer Animation and Virtual Worlds 20, 457–472
• camera orientation planning for cinematography,video inspection, computer games, virtual reality, etc.
• minimize surgeon disorientation in endoscopic surgery
• related problem: field de-rotator for altazimuth telescope
• maintenance for aircraft engines, gas turbines, pipes, etc.
• for many applications, RMDF image orientation can beachieved through software transformations
camera orientation frame along space curve r(ξ)
• assume target object fixed at origin (for moving target,consider only relative motion between camera & target)
• unit polar vector o(ξ) =r(ξ)|r(ξ)| defines camera optical axis
• let camera image plane, orthogonal to o(ξ), be spannedby two unit vectors u(ξ) and v(ξ)
• if r(ξ), r�(ξ) linearly independent, set v(ξ) =r(ξ)× r�(ξ)|r(ξ)× r�(ξ)|
• set u(ξ) = v(ξ)× o(ξ) — (o(ξ),u(ξ),v(ξ)) definesa right-handed orthonormal directed frame along r(ξ)
compare directed frame defined above
o =r| r | , u =
r× r�
| r× r� | × o , v =r× r�
| r× r� | (1)
with Frenet frame from differential geometry
t =r�
| r� | , n =r� × r��
| r� × r�� | × t , b =r� × r��
| r� × r�� | (2)
note that (t,n,b)→ (o,u,v) under map (r�, r��)→ (r, r�)
call (1) the Frenet directed frame, (2) the Frenet adapted frame
define anti-hodograph (indefinite integral) s(ξ) =�
r(ξ) dξ
⇒ Frenet directed frame of a curve r(ξ)= Frenet adapted frame of its anti-hodograph, s(ξ)
properties of “anti-hodograph” — s(ξ) =�
r(ξ) dξ
• curve hodographs (derivatives) r�(ξ) are widely used in CAGD
• anti-derivative of function f(ξ) is indefinite integral, s(ξ) =�
f(ξ) dξ
• infinitely many anti-hodographs — just translates of each other
• s(ξ∗) is a cusp of anti-hodograph ⇒ r(ξ) traverses origin at ξ = ξ∗
• s(ξ∗) is an inflection of anti-hodograph ⇒ tangent line to r(ξ)goes through origin for ξ = ξ∗
• polynomial curve ⇐⇒ polynomial anti-hodograph, but thiscorrespondence does not extend to rational anti-hodographs(integral of rational function may incur transcendental terms)
polar differential geometry of space curve r(ξ)
ρ = | r | , λ =| r× r� || r |3 , υ =
(r× r�) · r��
| r× r� |2
polar distance, polar curvature, polar torsion of r(ξ)= parametric speed, curvature, torsion of anti-hodograph, s(ξ) =
�r(ξ)
• polar curvature λ(ξ) ≡ 0 ⇐⇒ r(ξ) = line through origin
• polar torsion υ(ξ) ≡ 0 ⇐⇒ r(ξ) = in plane through origin
• hence, λ(ξ) ≡ 0 ⇒ κ(ξ) ≡ 0 and υ(ξ) ≡ 0 ⇒ τ(ξ) ≡ 0
• λ = 0 identifies polar inflection — r and r� linearly dependent
• polar helix λ(ξ)
υ(ξ)= constant ⇐⇒ r(ξ) = on cone with apex at origin
Frenet-Serret equations for directed frame (o,u,v)
o�u�v�
= ρ
0 λ 0
−λ 0 υ0 −υ 0
ouv
polar distance, polar curvature, polar torsion of r(ξ)
ρ = | r | , λ =| r× r� || r |3 , υ =
(r× r�) · r��
| r× r� |2
arc-length derivatives of (o,u,v)
dods
= e× o ,duds
= e× u ,dvds
= e× v .
polar Darboux vector e =ρ
σ(λv + υ o)
angular velocity of directed frame ω = | e | =ρ
σ
�λ2 + υ2
corresponding properties of the Frenetadapted and directed frames on space curves
Frenet adapted frame Frenet directed frametangent vector t polar vector oprincipal normal n principal axis ubinormal vector b bi-axis vector vnormal plane = span(n,b) image plane = span(u,v)
osculating plane = span(t,n) motion plane = span(o,u)
rectifying plane = span(b, t) orthogonal plane = span(v,o)
parametric speed σ polar distance ρ
curvature κ polar curvature λ
torsion τ polar torsion υ
each property of the Frenet directed frame of r(ξ) coincideswith the corresponding property of the Frenet adapted frame
of its anti-hodograph, s(ξ) =�
r(ξ) dξ
connection between Frenet adapted & directed frames
(t,n,b) and (o,u,v) are both orthonormal frames for R3
ouv
=
o · t o · n o · bu · t u · n u · bv · t v · n v · b
tnb
elements of matrix M ∈ SO(3) in terms of r, r�, r��, ρ = |r|, σ = |r�| :
o · t =r · r�
ρ σ, o · n = −
(r× r�) · (r� × r��)ρ σ | r� × r�� |
, o · b =(r× r�) · r��
ρ | r� × r�� |,
u · t =| r× r� |
ρ σ, u · n =
r · r�
ρ σ
(r× r�) · (r� × r��)| r× r� | | r� × r�� |
, u · b = −(r · r�) (r× r�) · r��
ρ | r× r� | | r� × r�� |,
v · t = 0 , v · n =σ (r× r�) · r��
| r× r� | | r� × r�� |, v · b =
(r× r�) · (r� × r��)| r× r� | | r� × r�� |
.
computation of rotation-minimizing directed frames
let (o,p,q) be rotation-minimizing directed frame on r(ξ)
obtain (p,q) from (u,v) by rotation in image plane�
pq
�=
�cos ψ sinψ
− sinψ cos ψ
� �uv
�
using anti-hodograph transformation, ψ = −�
υ ρdξ
(i.e., integral of polar torsion w.r.t. anti-hodograph arc length)
• RMDF angular velocity ω omits υ o term from polar Darboux vector
• infinitely many directed RMFs, corresponding to different integrationconstants (maintain fixed angles relative to each other)
• angle function ψ(ξ) can be determined exactly for spatial P curvesby rational function integration
example: circular camera path r(θ) = (r cos θ, r sin θ, h)
o =(r cos θ, r sin θ, h)√
r2 + h2, u = (− sin θ, cos θ, 0) , v =
(−h cos θ,−h sin θ, r)√r2 + h2
.
note — principal axis vector u coincides with curve tangent t
ρ = r�
r2 + h2 , λ =r
r2 + h2, υ =
h
r2 + h2.
polar distance, polar curvature, polar torsion — all constant
ψ = − θ�1 + (r/h)2
.
RMDF orientation relative to Frenet directed frame — linear in θ
directed frames on circular path, r(θ) = (r cos θ, r sin θ, h)
Left: polar vectors. Center: image-plane vectors for directed Frenet frame.Right: image-plane vectors for the rotation-minimizing directed frame.
views of ellipsoid with camera image planeoriented using Frenet directed frame (upper)and rotation-minimizing directed frame (lower)
example: helical path r(θ) = (r cos θ, r sin θ, kθ) with c = k/r
o =(cos θ, sin θ, c θ)√
1 + c2θ2,
u =(− c2θ (cos θ + θ sin θ)− sin θ, c2θ (θ cos θ − sin θ) + cos θ, c)√
1 + c2θ2√
1 + c2 + c2θ2,
v =(c (sin θ − θ cos θ),− c (cos θ + θ sin θ), 1)√
1 + c2 + c2θ2.
ρ = r�
1 + c2θ2 , λ =
√1 + c2 + c2θ2
r(1 + c2θ2)3/2, υ =
c θ
r(1 + c2 + c2θ2).
polar distance, polar curvature, polar torsion
ψ = tan−1
√1 + c2θ2
c− tan
−1 1
c−√
1 + c2θ2 − 1
c.
RMDF orientation relative to Frenet directed frame
directed frames on helical path, r(θ) = (r cos θ, r sin θ, kθ)
Left: polar vectors. Center: image-plane vectors for Frenet directed frame.Right: image-plane vectors for the rotation-minimizing directed frame.
views of ellipsoid with camera image planeoriented using Frenet directed frame (upper)and rotation-minimizing directed frame (lower)
closure
• theory, algorithms, applications for rotation-minimizing frames
• RRMF curves = PH curves with rational rotation–minimizing frames
• quaternion and Hopf map characterizations of RRMF quintics
• divisibility characterization for RRMF curves of any degree
• Yogi Berra’s insights on relationship between theory and practice
• rotation-minimizing directed frames in camera orientation control
• anti-hodograph and polar differential geometry of space curves
ANY QUESTIONS ??
It is better to ask a simple question, and perhaps seem likea fool for a moment, than to be a fool for the rest of your life.
old Chinese proverb
Please note —Answers to all questions will be givenexclusively in the form of Yogi Berra quotations.
some famous Yogi Berra responses
• If you ask me anything I don’t know,I’m not gonna answer.
• I wish I knew the answer to that, becauseI’m tired of answering that question.
Concerning future research directions . . .
• The future ain’t what it used to be.
Real-time CNC interpolatoralgorithms for motion control
Rida T. Farouki
Department of Mechanical & Aeronautical Engineering,University of California, Davis
— synopsis —
• fundamentals of CNC machines & real–time interpolators
• Taylor series interpolators for general parametric curves
• real–time interpolators for Pythagorean–hodograph curves
• experimental performance — PH curves versus G codes
• variable feedrates for constant material removal rate
• inverse dynamics problem for minimization of path error
• optimal orientations for contour machining of surfaces
fundamentals of CNC machines
• linear x, y, z axes driven by independent DC electric motors
• 5–axis CNC machine also incorporates rotary a, b axes
• machine input = path geometry (parametric curve) r(ξ)and feedrate (speed) V along path, constant or variable
• sampling frequency of software controller: f = 1− 10 kHz→ sampling interval ∆t = 1/f = 0.1− 1.0 millisecond
• position encoders measure actual location of each axis→ resolution = basic length unit (BLU) = 0.01− 0.1 mm
• real–time interpolator converts input r(ξ), V into reference pointsr(ξ1), r(ξ2), r(ξ3), . . . at sampling times ∆t, 2∆t, 3∆t, . . .
fundamentals of CNC machines (continued)
• at each sampling time ∆t, 2∆t, 3∆t, . . . controller comparesmeasured positions p1,p2,p3, . . . of machine (from encoders) withreference points r(ξ1), r(ξ2), r(ξ3), . . . from real–time interpolator
• controller uses components of position errors ek = r(ξk)− pk,k = 1, 2, 3, . . . to continuously adjust current to axis drive motors
• basic P controller — motor current proportional to position error
• PID controller — motor current proportional to position error, itsintegral, and its derivative (zero steady–state error & fast response)
• choice of controller gains (proportionality constants) must ensurestability of feedback control system
• we focus on the real–time interpolator algorithm here
3-axis “open architecture” CNC mill
• MHO Series 18 Compact Mill
• 18”×18”×12” work volume
• Yaskawa brushless DC motors
• zero-backlash precision ball screws
• linear encoders, ± 0.001” accuracy
• MDSI OpenCNC control software
• custom real-time interpolators
“conventional” vs. “high-speed” machining
• machining times are major determinant of product cost
• usual: feedrate ≤ 100 in/min, spindle speed ≤ 6, 000 rpm
• HSM: feedrate ≤ 1, 200 in/min, spindle speed ≤ 50, 000 rpm
• in HSM inertial forces may dominate cutting forces, friction, etc.(especially for intricate curved tool paths)
• resonance effects at machine natural frequencies becomemajor consideration
• most CNC machines significantly under-perform in practice— control software, not hardware, is usually the limiting factor
G codes – traditional tool path specification
approximate general curved paths by many short linear/circular moves
G01 = linear move, G02/G03 = clockwise/anti-clockwise circular move
X,Y = target point, I,J = offsets from current location to circle center
F = feedrate, S = spindle speed, T = tool selection, etc.
N01 G01 X0 Y0 F37200N02 G01 X-41 Y87N03 G01 X-62 Y189N04 G02 X-23 Y478 I654 J0N05 G01 X474 Y1015
. . . etc.
• accurate path specification =⇒ voluminous part programs
• block look-ahead problem for acceleration/deceleration management
• aliasing effects in HSM, when G code length comparable to V ∆t
real-time CNC interpolators
• computer numerical control (CNC) machine: digital control system
• in each sampling interval (∆t ∼ 10−3 sec) of servo system,compares actual position (measured by encoders on machine axes)with reference point (computed by real-time interpolator)
• real-time CNC interpolator algorithm — given parametric curve r(ξ)and speed (feedrate) function V , compute reference-point parametervalues ξ1, ξ2, . . . in real time:
� ξk
0
|r�(ξ)|dξ
V= k∆t , k = 1, 2, . . .
• general parametric curve — compute ξk by Taylor series expansion
• Pythagorean-hodograph (PH) curves — analytic reduction of“interpolation integral” ⇒ accurate & efficient real-time interpolator
Taylor series expansions
Suppose ξ(t) specifies time variation of the parameter along r(ξ) whentraversed with (constant or variable) feedrate V .
Reference–point parameter value ξk+1 obtained from preceding value ξk
by Taylor–series expansion
ξk+1 = ξk + ξ(tk)∆t + 12 ξ(tk) (∆t)2 + · · ·
of ξ(t) about t = tk = k∆t, where dots denote time derivatives=⇒ need expressions for time derivatives ξ(t), ξ(t), . . . of ξ(t).
For a given curve r(ξ), the parametric speed σ and feedrate V aredefined in terms of cumulative arc length s along r(ξ) by
σ = |r�(ξ)| =ds
dξ, V =
ds
dt
Time derivatives can be converted to parametric derivatives using
ddt
=ds
dt
dξ
ds
ddξ
=V
σ
ddξ
Successive applications of d/dt give
ξ =V
σ, ξ =
σV � − σ�V
σ2ξ ,
...ξ =
σV � − 3σ�V
σ2ξ +
σV �� − σ��V
σ2ξ2 , etc. ,
where primes indicate derivatives with respect to ξ. Derivatives of theparametric speed can be expressed recursively as
σ� =r� · r��
σ, σ�� =
r� · r��� + |r��|2 − σ�2
σ, etc.
For variable feedrate, must express V �, V ��, . . . in terms of derivativeswith respect to variable that V is specified as a function of
time-dependent feedrate: V (t) — acceleration/deceleration rates
V � =σ
V
dV
dt, V �� =
σ�
V
dV
dt− σ2
V 3
�dV
dt
�2
+σ2
V 2
d2V
dt2
arc-length-dependent feedrate: V (s) — distance along trajectory
V � = σdV
ds, V �� = σ�
dV
ds+ σ2 d2V
ds2
curvature-dependent feedrate: V (κ) — control material removal rate
V � = σdκ
ds
dV
dκ, V �� =
�σ�
dκ
ds+ σ2 d2κ
ds2
�dV
dκ+
�σ
dκ
ds
�2 d2V
dκ2
V (κ) case requires arc–length derivatives of curvature:
κ =(r� × r��) · z
σ3,
dκ
ds=
(r� × r���) · z− 3σ2σ�κ
σ4,
d2κ
ds2=
(r�� × r��� + r� × r����) · z− 3σ(2σ�2 + σσ��)κ− 7σ3σ�(dκ/ds)σ5
.
problems with Taylor series interpolators
• finite # of terms in Taylor series =⇒ unknown truncation error
• coefficients of higher–order terms very complicated & costly tocompute =⇒ incompatible with real–time computing
• several papers give erroneous coefficients for Taylor interpolators
Pythagorean-hodograph (PH) curves
r(ξ) = PH curve in Rn ⇐⇒ components of hodograph r�(ξ)
are elements of a Pythagorean (n + 1)–tuple of polynomials
PH curves exhibit special algebraic structures in their hodographs
• rational offset curves rd(ξ) = r(ξ) + dn(ξ)
• polynomial parametric speed σ(ξ) = |r�(ξ)| =ds
dξ
• polynomial arc-length function s(ξ) =� ξ
0|r�(ξ)| dξ
• energy integral E =� 1
0κ2 ds has closed-form evaluation
• real-time CNC interpolators, rotation-minimizing frames, etc.
Pythagorean triples — planar PH curves
x�2(t) + y�2(t) = σ2(t) ⇐⇒
x�(t) = u2(t)− v2(t)y�(t) = 2 u(t)v(t)σ(t) = u2(t) + v2(t)
K. Kubota, Pythagorean triples in unique factorization domains, Amer. Math. Monthly 79, 503–505 (1972)
R. T. Farouki and T. Sakkalis, Pythagorean hodographs, IBM J. Res. Develop. 34, 736–752 (1990)
R. T. Farouki, The conformal map z → z2 of the hodograph plane, Computer Aided Geometric Design11, 363–390 (1994)
complex model for planar PH curves
choose complex polynomial w(t) = u(t) + i v(t)
planar Pythagorean hodograph — r�(t) = (x�(t), y�(t)) = w2(t)
key features of planar PH curves
◦ planar PH cubics come from unique curve — Tschirnhausen’s cubicinsufficiently flexible for general free–form design
◦ planar PH quintics can interpolate arbitrary Hermite data —solve nested quadratic equations → always four distinct solutions
◦ extend to planar C2 PH quintic splines — “tridiagonal” systemof 2N+k quadratic equations in N complex unknowns
PH quintics (blue) have similar shape freedoms to “ordinary” cubics (red)
Bezier control polygons of rational offsets offsets exact at any distance
planar PH curves have rational offset curves for use as tool paths
Pythagorean quartuples — spatial PH curves
x�2(t) + y�2(t) + z�2(t) = σ2(t) ⇐⇒
x�(t) = u2(t) + v2(t)− p2(t)− q2(t)y�(t) = 2 [u(t)q(t) + v(t)p(t) ]z�(t) = 2 [ v(t)q(t)− u(t)p(t) ]σ(t) = u2(t) + v2(t) + p2(t) + q2(t)
R. Dietz, J. Hoschek, and B. Juttler, An algebraic approach to curves and surfaces on the sphereand on other quadrics, Computer Aided Geometric Design 10, 211–229 (1993)
H. I. Choi, D. S. Lee, and H. P. Moon, Clifford algebra, spin representation, and rationalparameterization of curves and surfaces, Advances in Computational Mathematics 17, 5-48 (2002)
quaternion model for spatial PH curves
choose quaternion polynomial A(t) = u(t) + v(t) i + p(t) j + q(t)k
spatial Pythagorean hodograph — r�(t) = (x�(t), y�(t), z�(t)) = A(t) iA∗(t)
key features of spatial PH curves
◦ spatial PH cubics are all helical curves — tangent satisfiesa · t = cos ψ (a = helix axis, ψ = helix angle) and κ/τ = constant
◦ spatial PH quintics can interpolate arbitrary Hermite data: solvethree quadratic equations → two-parameter family of interpolants
◦ extend to spatial C2 PH quintic splines — selection of manyfree parameters still an open problem
◦ many special types — helical polynomial curves; double PH curves(rational Frenet frames); rational rotation–minimizing frame curves; etc.
real-time CNC interpolatorsfor Pythagorean-hodograph (PH) curves
0 4 8 12 16
4
8
12
p0
p1
p4
p5
25 segments
! = 0.0105
50 segments
! = 0.0025
100 segments
! = 0.0006
Left: analytic tool path description (quintic PH curve). Right: approximationof path to various prescribed tolerances using piecewise-linear G codes.
comparative feedrate performance: 100 & 200 ipm
0 1 2 3 4 5 6 7 80
50
100
150
200
time (sec)
feed
rate
(ipm
)
G codes200 ipm
0
50
100
150
200
feed
rate
(ipm
)
G codes100 ipm
0 1 2 3 4 5 6 7 8time (sec)
PH curve200 ipm
PH curve100 ipm
The G code and PH curve interpolators both give excellent performance(red) at 100 and 200 ipm. The “staircase” nature of the x and y feedratecomponents (blue and green) for the G codes indicate faithful reproductionof the piecewise-linear path, while the PH curve yields smooth variations.
comparative feedrate performance: 400 & 800 ipm
0 1 2 30
200
400
600
800
time (sec)
feed
rate
(ipm
)
G codes800 ipm
0
200
400
600
800
feed
rate
(ipm
)
G codes400 ipm
0 1 2 3time (sec)
PH curve800 ipm
PH curve400 ipm
At 400 & 800 ipm, the PH curve interpolator continues to yield impeccableperformance – but the performance of the G code interpolator is severelydegraded by “aliasing” effects, incurred by the finite sampling frequencyand discrete nature of the piecewise-linear path description.
repertoire of feedrate variations for PH curves
real-time CNC interpolator: given parametric curve r(ξ) and feedratevariation V , compute reference-point parameter values ξ1, ξ2, . . . from
� ξk
0
|r�(ξ)|dξ
V= k∆t
usual approach — invoke a truncated Taylor series expansion
ξk = ξk−1 +V
σ∆t +
V
σ2
�V � − r� · r��
σ2V
�(∆t)2
2+ · · ·
PH curves admit analytic reduction of the interpolation integral, for manyfeedrate variations of practical interest:
◦ constant V, linear or quadratic dependence V (s) on arc length s
◦ time-dependent feedrate, for any easily integrable function V (t)— useful for acceleration and deceleration management
◦ curvature-dependent feedrate for constant material removal rate(MRR) at fixed depth of cut δ — V (κ) = V0 [ 1 + κ(d− 1
2δ) ]−1
constant, linear, quadratic arc length dependence
0.0 0.2 0.4 0.6 0.8 1.00
2
4
6
8
10
s / S
V
a b c
a
b
c
material removal rate (MRR) as function of curvature
r r
!!
!
linear, " = 0 anticlockwise, " = 1 / rclockwise, " = –1 / r
V0
V0
V0
Volume removed (yellow area) by a cylindrical tool of radius d moving withfeedrate V0 through depth of cut δ for: a clockwise circular path of radius r(left); a linear path (center); and an anti–clockwise circular path of radius r(right). In each case, the MRR can be expressed in terms of the curvatureas V0 δ [ 1 + κ(d− 1
2δ) ]. Hence, to maintain constant MRR, one should usethe curvature–dependent feedrate
V (ξ) =V0
1 + κ(ξ) (d− 12δ)
.
curvature-dependent feedrate for constant MRR
0.0 0.2 0.4 0.6 0.8 1.00.0
0.5
1.0
1.5
2.0
fractional arc length s / S
feed
rate
var
iatio
n V
/V 0
r(!)
rd(!)a
b
cd
a
b
c
d
4 8 12 16 20 24 28 32 36 40 44 48 52 56 600.00
0.25
0.50
0.75
1.00
1.25
curve arc length (mm)
aver
age
cutti
ng fo
rce
(kN
)
250 Hz sampling
constant feedrate, V = V0
variable feedrate,V = V0 / [ 1 + ! (d – 0.5 ") ]
time-dependent feedrates foracceleration & deceleration profiles
quintic
1.0 1.1 1.2 1.3 1.4 1.50
200
400
600
800
time (sec)
feed
rate
(ipm
)
cubic
0
200
400
600
800
feed
rate
(ipm
)
linear
0
200
400
600
800
feed
rate
(ipm
)
1.0 1.1 1.2 1.3 1.4 1.50
1200
2400
3600
4800
time (sec)
acce
lera
tion
(ipm
/sec
)
0
1200
2400
3600
4800
acce
lera
tion
(ipm
/sec
)
0
1200
2400
3600
4800
acce
lera
tion
(ipm
/sec
)
(acceleration magnitude)2 =�
dV
dt
�2
+ κ2 V 4
G codes for PH curve tool paths
G05 = quintic PH curve, A,B,C,P,Q,R = coefficients of u(t), v(t)
X,Y = target point, F & U,V,W = variable feedrate type & parameters
N05 G05 H5 F0 U37200N10 G05 X1092 Y-294 A-31.026 B-38.537 C-31.481 P16.934 Q-16.436 R13.062N15 G05 X1470 Y-1386 A-31.481 B-24.426 C-28.476 P13.062 Q42.560 R2.794N20 G05 X2226 Y-294 A-28.476 B-32.526 C-36.896 P2.794 Q-36.972 R-14.887N25 G05 X3444 Y504 A-36.896 B-41.267 C-32.579 P-14.887 Q7.197 R-25.365N30 G05 X2226 Y1722 A-32.579 B-23.892 C8.378 P-25.365 Q-57.927 R-36.389N35 G05 X2100 Y504 A8.378 B40.647 C21.987 P-36.389 Q-14.851 R-28.356N40 G05 X1134 Y252 A21.987 B3.326 C-13.761 P-28.356 Q-41.861 R-28.525N45 G05 X756 Y1050 A-13.761 B-30.849 C-3.668 P-28.525 Q-15.189 R-32.746N50 G05 X0 Y0 A-3.668 B23.514 C31.026 P-32.746 Q-50.304 R-16.934
R. T. Farouki, J. Manjunathaiah, G–F. Yuan, G codes for the specification of Pythagorean–hodographtool paths and associated feedrate functions on open–architecture CNC machines, International Journalof Machine Tools & Manufacture 39, 123–142 (1999)
allows combination of traditional (linear/circular) G codes and PH quintics,with variable feedrates — dependent on time, arc length, or curvature
inverse dynamics problem for path error minimization
inertia (resistance to motion) and damping (frictional energy dissipation)of CNC machine axes prevent exact execution of commanded motion
develop dynamic model of machine/controller system, expressed in termsof linear ordinary differential equations
transform independent variable from the time t to the curve parameter ξ :constant coefficients→ polynomial coefficients
revert differential equations: swap input & output dependent variables
solve reverted differential equations for modified input path that, subjectto machine dynamics, exactly yields desired output path
for brevity, consider only x–axis motion (same principles for y, z axes)
block diagram of CNC machine x–axis drive with PID controller
ka kt
i1 / (Js+B)
T1 / s
!rg
" xX ergkp + ki / s + kd s
u+ –
X = commanded position from real–time interpolatorx = actual position as measured by position encoderse = X − x = instantaneous x–axis position errorkp, ki, kd = proportional, integral, derivative gainsu = output voltage from controlleri = current from current amplifierT = torque from DC electric motorJ , B = x–axis inertia and dampingω, θ = motor shaft angular speed & positionrg = transmission ratio (angular→ linear conversion)
machine/controller dynamics
CNC machine executes actual path (x(t), y(t)) determined fromcommanded path (X(t), Y (t)) by differential equations of the form
ax...x + bx x + cx x + x = dx X + ex X + X ,
ay...y + by y + cy y + y = dy Y + ey Y + Y ,
where dots indicate time derivatives, constant coefficients ax, bx, . . .depend on the machine/controller physical parameters.
But commanded path (X(ξ), Y (ξ)) specified by general parameter ξ,rather than time t.
Transform independent variable: time t → curve parameter ξ
ddt
=ds
dt
dξ
ds
ddξ
=V
σ
ddξ
,
where σ = ds/dξ = parametric speed, and V = ds/dt = feedrate.
If ξ(t) specifies time variation of parameter when (X(ξ), Y (ξ)) is traversedwith (constant or variable) feedrate V , its time derivatives are
ξ =V
σ, ξ =
σV � − σ�V
σ2ξ ,
...ξ =
σV � − 3σ�V
σ2ξ +
σV �� − σ��V
σ2ξ2 , etc.
and we have
ddt
= ξddξ
,d2
dt2= ξ2 d2
dξ2+ ξ
ddξ
,d3
dt3= ξ3 d3
dξ3+3 ξ ξ
d2
dξ2+...ξ
ddξ
, etc.
Hence transformed differential equations become
αx(ξ) x��� + βx(ξ) x�� + γx(ξ) x� + δx(ξ) x = λx(ξ) X �� + µx(ξ) X � + νx(ξ) X ,
αy(ξ) y��� + βy(ξ) y�� + γy(ξ) y� + δy(ξ) y = λy(ξ) Y �� + µy(ξ) Y � + νy(ξ) Y ,
where primes denote derivatives with respect to ξ, and αx(ξ),βx(ξ), . . .are polynomials in ξ if (X(ξ), Y (ξ)) is a PH curve.
Now revert the differential equations — solve “backwards” to find inputrequired to produce desired output.
Input = modified path (X(ξ), Y (ξ)), output = desired path (X(ξ), Y (ξ))
λx(ξ)X �� + µx(ξ)X � + νx(ξ)X = αx(ξ)X ��� + βx(ξ)X �� + γx(ξ)X � + δx(ξ)X,
λy(ξ)Y �� + µy(ξ)Y � + νy(ξ)Y = αy(ξ)Y ��� + βy(ξ)Y �� + γy(ξ)Y � + δy(ξ)Y.
Must solve initial value problem for linear ODEs in X(ξ), Y (ξ) with knownpolynomials in ξ as coefficients and right–hand sides.
Simplest case: P controller with ki = kd = 0 ⇒ λx(ξ) = µx(ξ) ≡ 0 andλy(ξ) = µy(ξ) ≡ 0. Can solve exactly for X, Y as
X =bxσV 2X �� + V [ bx(σV � − σ�V ) + cxσ2 ]X � + σ3X
σ3,
Y =byσV 2Y �� + V [ by(σV � − σ�V ) + cyσ2 ]Y � + σ3Y
σ3.
Modified path exactly determined as higher–order rational Bezier curve!
For more sophisticated PI and PID controllers, obtain first and secondorder differential equations for X, Y .
NOTE: ki �= 0 ⇒ zero steady–state error and kd �= 0 ⇒ fast response.
ODEs with polynomial coefficients & right–hand sides do not, in general,admit polynomial solutions.
Need good numerical method to approximate solutions on ξ ∈ [ 0, 1 ] bypolynomial or piecewise–polynomial functions:
• Chebyshev economization methods
• linear least–squares approximation
• interpolation at Chebyshev nodes
• . . . etc.
example: quintic PH curve and P controller
original curve modified curve
Left: quintic PH curve defining desired path (X(ξ), Y (ξ)). Right: modifiedpath (X(ξ), Y (ξ)) that compensates for the machine/controller dynamics,for a P controller with gain kp = 10 and constant feedrate V = 0.12 m/s.
0.0 0.25 0.50 0.75 1.0
–60
–40
–20
0
arc length s
curvature !
0.0 0.25 0.50 0.75 1.00
1
2
3
4
arc length s
parametric speed "
Extreme variation of parametric speed and curvature on quintic PH curve.
comparison of output for original and modified paths
P controller with gain kp = 10 and constant feedrate V = 0.12 m/s
executedcommanded
original path
executedcommanded
modified path
Comparison of commanded and executed motions for original (left) andmodified (right) paths. In the former case, the executed motion deviatessignificantly from the desired path. In the latter case, the executed motionis essentially indistinguishable from the original commanded path.
axis accelerations for original and modified paths
0 1 2 3 4 5 6 7 8 9 10–0.4
–0.2
0.0
0.2
0.4
0.6
0.8
time (sec)
x a
xis
acce
lera
tion
(m/s
2)
original path
modified path
0 1 2 3 4 5 6 7 8 9 10–1.0
–0.8
–0.6
–0.4
–0.2
0.0
0.2
time (sec)
y a
xis
acce
lera
tion
(m/s
2)
original path
modified path
Comparison of x and y axis accelerations for original and modified paths.The modified path incurs greater peak accelerations, requiring a highermotor torque capacity.
results for the PI controller
executedcommanded
original path
executedcommanded
modified path
Commanded and executed motions for original (left) and modified (right)paths, using a PI controller with gains kp = ki = 10 and constant feedrateV = 0.12 m/s. Modified path is approximated by a degree 30 polynomial,constructed by interpolation at the Chebyshev nodes on ξ ∈ [ 0, 1 ].
contour machining of free-form surfaces
Given parametric surface r(u, v) for (u, v) ∈ [ 0, 1 ]× [ 0, 1 ] and set Π ofparallel planes with normal N and equidistant spacing ∆, planar sectionsof r(u, v) by planes of Π are the surface contours.
In contour machining, these surface contours define the contact curvesof a spherical cutter with r(u, v). Spacing between adjacent contours is� ≈ ∆/
�1− (N · n)2, where surface normal n is defined by
n =ru × rv
|ru × rv|, (u, v) ∈ [ 0, 1 ]× [ 0, 1 ] .
For “best quality” contours — that minimize scallop height of machinedsurface between adjacent tool paths — we need to find orientation N ofthe planes Π that minimizes N · n for (u, v) ∈ [ 0, 1 ]× [ 0, 1 ].
In other words, N should be “as far as possible” from the set {n } of allnormals to the surface r(u, v).
optimal section-plane orientation
strategy for optimal orientation N of section planes
• set of normals {n} = Gauss map of surface, on unit sphere S2
• Gauss map boundary = subset of images of the parabolic lines(zero Guassian curvature) and patch boundaries on S2
• symmetrize Gauss map by identifying opposed normals n, −n
• perform stereographic projection of Gauss map from S2 to R2
• compute medial axis transform on complement of Gauss map
• center of largest circle in medial axis transform identifies vectorN furthest from all normals n to r(u, v)
• also applies to rapid prototyping / layered manufacturing processes
T. S. Smith, R. T. Farouki, M. al–Kandari, and H. Pottmann, Optimal slicing of free–form surfaces,Computer Aided Geometric Design 19, 43–64 (2002)
parabolic lines on free-form surfaces
Gauss map computation for free-form surfaces medial axis transform for complement of Gauss map
closure
• Pythagorean-hodograph curves ideally suited to CNC machining
• PH curve real–time interpolator algorithms for feedrates dependenton time, arc length, or curvature
• anayltic curve interpolators give smoother and more accuraterealization of high feedrates and acceleration rates than G codes
• PH curves amenable to solution of inverse dynamics problemsto compensate for inertia & damping of machine axes
• spatial motion planning problems — optimal orientation of sectionplanes for contour machining & use of rotation–minimizing framesin 5–axis machining