Motion design with Euler-Rodrigues frames of quintic Pythagorean-hodograph curves

Similar documents
Geometric Lagrange Interpolation by Planar Cubic Pythagorean-hodograph Curves

A quaternion approach to polynomial PN surfaces

Curvature variation minimizing cubic Hermite interpolants

Hermite Interpolation with Euclidean Pythagorean Hodograph Curves

NONEXISTENCE OF RATIONAL ROTATION MINIMIZING FRAMES ON QUINTIC HELICES

Rotation-minimizing frames on space curves theory, algorithms, applications

ON INTERPOLATION BY PLANAR CUBIC G 2 PYTHAGOREAN-HODOGRAPH SPLINE CURVES

A complete classification of quintic space curves with rational rotation minimizing frames

Geometric Interpolation by Planar Cubic Polynomials

Pythagorean-hodograph curves

Construction of rational surface patches bounded by lines of curvature

High order parametric polynomial approximation of conic sections

On Parametric Polynomial Circle Approximation

Approximation of Circular Arcs by Parametric Polynomial Curves

G-code and PH curves in CNC Manufacturing

On Rational Minkowski Pythagorean Hodograph Curves

Barycentric coordinates for Lagrange interpolation over lattices on a simplex

G 1 Hermite Interpolation by Minkowski Pythagorean Hodograph Cubics

Cubic Helices in Minkowski Space

Extrapolation Methods for Approximating Arc Length and Surface Area

Approximation of Circular Arcs by Parametric Polynomials

ON GEOMETRIC INTERPOLATION BY PLANAR PARAMETRIC POLYNOMIAL CURVES

Spiral spline interpolation to a planar spiral

Pythagorean-hodograph curves in Euclidean spaces of dimension greater than 3

Geometric approximation of curves and singularities of secant maps Ghosh, Sunayana

Chordal cubic spline interpolation is fourth order accurate

Formalizing Basic Quaternionic Analysis

SPLIT QUATERNIONS and CANAL SURFACES. in MINKOWSKI 3-SPACE

HIGHER DIMENSIONAL MINKOWSKI PYTHAGOREAN HODOGRAPH CURVES

Isogeometric Analysis with Geometrically Continuous Functions on Two-Patch Geometries

13 Path Planning Cubic Path P 2 P 1. θ 2

Math 302 Outcome Statements Winter 2013

Interpolated Rigid-Body Motions and Robotics

Investigation of non-lightlike tubular surfaces with Darboux frame in Minkowski 3-space

EXPLICIT ERROR BOUND FOR QUADRATIC SPLINE APPROXIMATION OF CUBIC SPLINE

Linear Ordinary Differential Equations

Institute of Geometry, Graz, University of Technology Mobile Robots. Lecture notes of the kinematic part of the lecture

Week 3: Differential Geometry of Curves

Differential Kinematics

Planar interpolation with a pair of rational spirals T. N. T. Goodman 1 and D. S. Meek 2

SIAM Conference on Applied Algebraic Geometry Daejeon, South Korea, Irina Kogan North Carolina State University. Supported in part by the

Kinematics. Basilio Bona. Semester 1, DAUIN Politecnico di Torino. B. Bona (DAUIN) Kinematics Semester 1, / 15

ON THE RULED SURFACES WHOSE FRAME IS THE BISHOP FRAME IN THE EUCLIDEAN 3 SPACE. 1. Introduction

Kinematics. Basilio Bona. October DAUIN - Politecnico di Torino. Basilio Bona (DAUIN - Politecnico di Torino) Kinematics October / 15

Section Arclength and Curvature. (1) Arclength, (2) Parameterizing Curves by Arclength, (3) Curvature, (4) Osculating and Normal Planes.

PURE MATHEMATICS AM 27

, respectively to the inverse and the inverse differential problem. Check the correctness of the obtained results. Exercise 2 y P 2 P 1.

There is a function, the arc length function s(t) defined by s(t) = It follows that r(t) = p ( s(t) )

CIRCLE TO CIRCLE TRANSITION WITH A SINGLE PH QUINTIC SPIRAL. Zulfiqar Habib and Manabu Sakai. Received July 16, 2005; revised March 19, 2007

Solutions for Math 348 Assignment #4 1

MATH Final Review

Position and orientation of rigid bodies

What is a Space Curve?

Statistical Geometry Processing Winter Semester 2011/2012

Timelike Rotational Surfaces of Elliptic, Hyperbolic and Parabolic Types in Minkowski Space E 4 with Pointwise 1-Type Gauss Map

Analytic and Algebraic Properties of Canal Surfaces

Introduction to Computer Graphics. Modeling (1) April 13, 2017 Kenshi Takayama

On a family of surfaces with common asymptotic curve in the Galilean space G 3

An introduction to Birkhoff normal form

Dierential Geometry Curves and surfaces Local properties Geometric foundations (critical for visual modeling and computing) Quantitative analysis Algo

Tennessee s State Mathematics Standards Precalculus

Course Notes Math 275 Boise State University. Shari Ultman

PRECALCULUS BISHOP KELLY HIGH SCHOOL BOISE, IDAHO. Prepared by Kristina L. Gazdik. March 2005

Kinematics. Basilio Bona. Semester 1, DAUIN Politecnico di Torino. B. Bona (DAUIN) Kinematics Semester 1, / 15

Classical differential geometry of two-dimensional surfaces

3 = arccos. A a and b are parallel, B a and b are perpendicular, C a and b are normalized, or D this is always true.

Arsène Pérard-Gayot (Slides by Piotr Danilewski)

Study guide for Exam 1. by William H. Meeks III October 26, 2012

LECTURE NOTES ELEMENTARY NUMERICAL METHODS. Eusebius Doedel

Differential Geometry Exercises

Elementary maths for GMT

Mobile Robotics 1. A Compact Course on Linear Algebra. Giorgio Grisetti

Directional Field. Xiao-Ming Fu

Smooth Path Generation Based on Bézier Curves for Autonomous Vehicles

9-12 Mathematics Vertical Alignment ( )

Global Maxwellians over All Space and Their Relation to Conserved Quantites of Classical Kinetic Equations

Interpolation of Rigid Motions in 3D

IMAGE INVARIANTS. Andrej Košir, Jurij F. Tasič

G 2 Curve Design with Generalised Cornu Spiral

Space curves, vector fields and strange surfaces. Simon Salamon

Smarandache Curves and Spherical Indicatrices in the Galilean. 3-Space

Vectors Coordinate frames 2D implicit curves 2D parametric curves. Graphics 2008/2009, period 1. Lecture 2: vectors, curves, and surfaces

HOMEWORK 2 SOLUTIONS

CS545 Contents XIII. Trajectory Planning. Reading Assignment for Next Class

Distances, volumes, and integration

Lecture D16-2D Rigid Body Kinematics

Spring, 2012 CIS 515. Fundamentals of Linear Algebra and Optimization Jean Gallier

EXISTENCE OF SET-INTERPOLATING AND ENERGY- MINIMIZING CURVES

Rotation minimizing osculating frames

Parallel Transport Frame in 4 dimensional Euclidean Space E 4

BC Calculus Syllabus. Assessment Students are assessed in the following ways:

On the Lebesgue constant of subperiodic trigonometric interpolation

A TWO-STEP ALGORITHM OF SMOOTH SPLINE GENERATION ON RIEMANNIAN MANIFOLDS

Quaternion Cubic Spline

Math 32A Discussion Session Week 5 Notes November 7 and 9, 2017

Computing roots of polynomials by quadratic clipping

DIFFERENTIAL KINEMATICS. Geometric Jacobian. Analytical Jacobian. Kinematic singularities. Kinematic redundancy. Inverse differential kinematics

Math 4C Fall 2008 Final Exam Study Guide Format 12 questions, some multi-part. Questions will be similar to sample problems in this study guide,

MATH 2083 FINAL EXAM REVIEW The final exam will be on Wednesday, May 4 from 10:00am-12:00pm.

MATH-1420 Review Concepts (Haugen)

Transcription:

Motion design with Euler-Rodrigues frames of quintic Pythagorean-hodograph curves Marjeta Krajnc a,b,, Vito Vitrih c,d a FMF, University of Ljubljana, Jadranska 9, Ljubljana, Slovenia b IMFM, Jadranska 9, Ljubljana, Slovenia c FAMNIT, University of Primorska, Glagoljaška 8, Koper, Slovenia d IAM, University of Primorska, Muzejski trg, Koper, Slovenia Abstract The paper presents an interpolation scheme for G Hermite motion data, i.e., interpolation of data points and rotations at the points, with spatial quintic Pythagorean-hodograph curves so that the Euler-Rodrigues frame of the curve coincides with the rotations at the points. The interpolant is expressed in a closed form with three free parameters, which are computed based on minimizing the rotations of the normal plane vectors around the tangent and on controlling the length of the curve. The proposed choice of parameters is supported with the asymptotic analysis. The approximation error is of order four and the Euler-Rodrigues frame differs from the ideal rotation minimizing frame with the order three. The scheme is used for rigid body motions and swept surface construction. Keywords: Pythagorean-hodograph, Euler-Rodrigues frame, rotation minimizing frame, motion design, quaternion, Hermite interpolation. Introduction To compute an orthonormal frame of a spatial curve r is an important task in computer animation, motion planning, swept surface construction, etc. Frames determine an orientation of a rigid body as it traverses the curve. Typically an adapted frame (f, f, f 3 ) is searched for, which has Corresponding author. Email address: marjetka.krajnc@fmf.uni-lj.si (Marjeta Krajnc) Preprint submitted to Mathematics and Computers in Simulation March 7,

the property that f = ṙ/ ṙ = t is a tangent vector, and the remaining two vectors span the normal plane. A well known adapted frame is the Frenet frame (t, n, b) (see []), but it is often unsuitable for practical applications since it is not defined at inflection points and it incurs an unnecessary rotation of the normal plane vectors n and b around t. The most attractive frame in motion design applications and swept surface construction is a rotation minimizing frame (RMF frame), which is characterized through a solution of first-order differential equations (see [], e.g.). More precisely, there should be no instantaneous rotation of f and f 3 around f = t. The variation of any adapted frame (f, f, f 3 ) along the curve r is determined by the angular velocity vector ω as f = ω f, f = ω f, f 3 = ω f 3. We can write ω = ω f + ω f + ω 3 f 3, where ω = f f 3 = f f 3, ω = f 3 f = f 3 f, ω 3 = f f = f f. The property of the RMF frame is that ω f =, or equivalently ω =. Operations and denote the standard cross and scalar products. An important property for computer aided design applications is that a frame is rationally dependent. Therefore it is necessary that a curve r is a Pythagorean-hodograph curve (PH curve). PH curves are characterized by the property that the Euclidean norm of their hodograph is a piecewise polynomial ([3]). As a consequence, they have a rational unit tangent, rational offset, polynomial arc length, etc. But clearly, the PH property does not ensure a rational RMF frame (RRMF frame) of a curve, and a construction of such curves is a difficult task since the nonlinear constraints are involved. For more results on a construction, applications and rational approximation of RMF curves see [4], [6], [7], [9], [3], and the citations quoted therein. There exists a special adapted frame defined particularly on spatial PH curves, so called Euler-Rodrigues frame (ERF frame) that has been introduced in []. This frame has the property of being rational by construction and it is always nonsingular at inflection points. Unfortunately, the ERF frame is not in general the RMF frame. In [], it is shown that for cubic PH curves ERF and Frenet frames are the same. It is also shown, that a true spatial PH curve with the ERF frame being an RMF frame has to be of degree at least 7.

In this paper we present a scheme for interpolation of G Hermite motion data, i.e., interpolation of data points and rotations at the points, with quintic PH curves so that the ERF frame of the curve coincides with the rotations at the points. The scheme can be applied for a construction of a rigid body motion with some given positions interpolated, where each position is represented by a position of a center of a rigid body (point in R 3 ) and the orientation with respect to some fixed coordinate system (rotation in R 3 ). The obtained quintic PH curve is expressed with three free parameters. Two of them are used to control the length of the curve or to provide a C interpolant, while the remaining one is computed in such a way that the ERF frame is as close as possible to the corresponding RMF frame. Note that there can exist a quintic PH curve interpolating the G Hermite motion data with the exact RRMF frame, but with no degrees of freedom left. This problem is studied in [6], but it is of a highly nonlinear nature and no a priori guarantee for the existence of the interpolant is provided, except for the asymptotic data. Furthermore, it is easy to construct examples where no interpolant exists or where the shape of the curve is not pleasant to the eye. The advantages of the quintic PH interpolant derived in this paper are that the nonlinear part of the problem has a closed form solution, the frame is rational by construction and has a minimal rotation of normal plane vectors around the tangent among all the possible PH quintics with the same end tangents and with an associated ERF interpolating the assigned end rotations. Furthermore, there are no restrictions on the data for the solution to exist and the main numerical work required is to solve a minimization problem for one variable with a very good starting value provided. The results are supported by the asymptotic analysis. It is shown that the approximation error is of order four and that the ERF frame differs from the RMF frame with the order three. Numerical examples confirm that the interpolant is competitive with interpolants obtained in [6]. The paper is organized as follows. In Section, a quaternion representation of spatial PH curves and a definition of the Euler-Rodrigues frame are briefly recalled. In the next section, the interpolation problem with a spatial PH quintic, which interpolates two end points and whose ERF frame coincides with given rotations at the points, is presented, and a three-parameter family of solutions is derived. Section 4 deals with a C interpolation with prescribed lengths of tangents at the interpolation points. An asymptotic analysis is provided, which offers the results also for the non-asymptotic applications. Further, a more general G interpolation is considered and several 3

criteria how to choose free parameters are presented. Numerical examples from Section 5 illustrate the theoretical results. The paper is concluded with Section 6 that summarizes the main results of the paper and identifies possible future investigations.. Quaternion representation of PH curves Many representations of PH curves were proposed in the last few years. The planar PH curves can be defined through some relations between complex numbers, while the spatial PH curves by relations between quaternions or through a Hopf map representation ([3]). Recently, particular algebraic equations, that identify a PH curve independently of the dimension of a space, have been derived in []. In this paper a quaternion representation is used, thus let us briefly recall some basic properties and notation needed further on. Quaternions form a 4-dimensional vector space H with a standard basis {, i, j, k}, = (,,, ), i = (,,, ), j = (,,, ), k = (,,, ). The first component of a quaternion is called a scalar part, while the remaining three components form a vector part of a quaternion. A quaternion with a zero scalar part is called a pure quaternion. Vectors in R 3 can be identified with pure quaternions and vice versa. If we write A = (a, a) and B = (b, b), a, b R, a, b R 3, then A + B = (a + b, a + b), AB = (ab a b, ab + ba + a b). With this associative, but noncommutative multiplication the space of quaternions becomes an algebra. Moreover, Ā := (a, a) denotes a conjugate of A and the norm of a quaternion A is defined as A = ĀA = AĀ = a + a, where a = a a is the Euclidean norm of the vector a. Furthermore, let us define a commutative multiplication on the space of quaternions as A B := (A i B + B i Ā). 4

Note that A B is a pure quaternion and will be identified with a vector in R 3 several times later on. A shorter notation A := A A will be used, and the solution of a quadratic equation which is given in the next lemma will be needed. The proof can be found in [8]. Lemma. Let A be a given pure quaternion which is not a negative multiple of i. Then all the solutions of a quadratic equation X = A form a one parametric family X = X (ϕ) = A A A + i A Q(ϕ), + i A Q(ϕ) := cos ϕ + i sin ϕ, ϕ [ π, π). For A = i, the solution is X (ϕ) = A k Q(ϕ). A Spatial PH curves and quaternions are connected in the following way (see [3]). A spatial PH curve p can be generated from a quaternion polynomial A(t) = a(t) + i b(t) + j c(t) + k d(t), where a, b, c and d are relatively prime polynomials of degree n, as ṗ(t) := h(t) := A(t). () Here ṗ denotes the derivative of p with respect to t. Integration of the hodograph h gives a polynomial PH curve p of degree n +. The quaternion A(t) is called the preimage. Note that quaternions A(t) and A(t)Q(ϕ) generate the same hodograph. A special adapted frame for PH curves called the Euler-Rodrigues frame is defined as follows. Definition. The Euler-Rodrigues frame F ER = (f, f, f 3 ) of a spatial PH curve generated from a quaternion polynomial A(t) is defined as f (t) = A(t) i Ā(t) A(t), f (t) = A(t) j Ā(t) A(t), f 3 (t) = A(t) k Ā(t) A(t). The ERF frame has a property of being defined at every point of a PH curve. Moreover, if p is of degree n +, then the ERF frame is rational of degree n. Since the quaternion representation of a PH curve is not unique, the ERF frame is not uniquely defined either. However, each pair of two ERF frames has a constant angular difference along the curve. 5

At every point, any adapted frame is defined by three orthonormal vectors which form a rotation in R 3. Note that each rotation can be written in a form q + q q q3 (q q q q 3 ) (q q 3 + q q ) (q q + q q 3 ) q q + q q3 (q q 3 q q ) = (q q 3 q q ) (q q 3 + q q ) q q q + q3 = ( Q i Q, Q j Q, Q k Q ), () where Q = (q, q, q, q 3 ) H, Q =, and q, q, q, q 3 are called normalized Euler parameters (see []). Antipodal quaternions (i.e., quaternions that differ only by the sign of their components) represent the same rotation. Any adapted frame can thus be at each point represented by two antipodal quaternions. The bijective map between the space of rotations and the space of unit quaternions with identified antipodal points is called a kinematic map. 3. Interpolation problem In this section a cornerstone problem for a construction of a quintic PH spline that interpolates the positions of a rigid body is presented. Let P, P R 3 be two given points and let F = (f,, f,, f,3 ) R 3 3, F = (f,, f,, f,3 ) R 3 3 be two given frames, such that f l,i =, f l,i f l,j =, l =,, i, j {,, 3}, i j. Furthermore, let Q l := (q l,i ) 3 i= H, l =,, denote two unit quaternions that correspond to the frames F l, l =,, and satisfy Q Q >. Here denotes the standard scalar product on 4- dimensional vectors. The task is to find a quintic PH curve p : [, ] R 3 that interpolates the given points P, P, p() = P, p() = P, (3) and has the ERF frames at t = and t = equal to F and F, respectively. 6

The curve, its hodograph and the preimage can be written in a Bernstein form as 5 4 p(t) := p i Bi 5 (t), h(t) := h i Bi 4 (t), A(t) := A i Bi (t), (4) i= i= where p i, h i (pure quaternions) and A i (quaternions) are the control points, and ( ) n Bj n (t) = t j ( t) n j, j =,,..., n, j are the Bernstein basis polynomials. From the interpolation of the frames and from interpolation conditions (3) we obtain p = P, p 5 = P, A = λ Q, A = λ Q, (5) where λ, λ R are the unknown parameters. The control points of the curve and its hodograph are connected as h i = 5 p i, i =,,..., 4, where p i := p i+ p i is a forward difference. Conditions (3) imply the equation 4 h i = 5 P. (6) i= Furthermore, the relation between the hodograph and the preimage h(t) = A(t) can be expressed as h = λ Q, h = λ Q A, h = 3 (A + λ λ Q Q ), (7) h 3 = λ A Q, h 4 = λ Q. Let A := (a, b, c, d ). Substituting (7) into (6) gives the nonlinear system of three equations for six unknowns a, b, c, d, λ and λ. It can be written as A + A B + c =, (8) where B := 3 (λ Q + λ Q ), c := 3 i= ( λ Q + λ Q + 3 λ λ Q Q 5 P ). 7

By transforming the equation (8) into ( A + B ) = 4 B c, and by using Lemma, we obtain a one-parametric family of solutions for the unknown quaternion A : A = 4 B + Y Q(ϕ), Y := B c 4 B c 4 B c + i 4 B c 4 B c + i, ϕ [ π, π). (9) The coefficients a, b, c and d are thus expressed with three free (shape) parameters λ, λ and ϕ and their choice clearly has a great influence on the shape of the resulting curve and on the properties of the ERF frame. Since the ERF frame of a quintic PH curve can be an RMF frame only if the curve is planar, our first aim is that the resulting ERF frame would be as close as possible to the ideal RMF frame. Another criteria that can be used to choose the parameters is to control the length of a curve p. The following theorem reveals that the length of p is independent of the parameter ϕ. Theorem. The length of the interpolating PH curve p defined by (4), (5) and (9) depends only on the parameters λ and λ and not on the parameter ϕ. Proof. From a quaternion representation of a PH curve the norm of the hodograph can be expressed as 4 σ(t) := h(t) = A(t)Ā(t) =: i= σ i B 4 i (t), where σ = A Ā, σ = ( ) A Ā + A Ā, σ = ( ) A Ā + 4A Ā + A Ā, 6 σ 3 = ( ) A Ā + A Ā, σ4 = A Ā, 8

and the length of p simplifies to l(p) := h(t) dt = 5 4 σ i. () Recall (9) and note that Y = 4 B c. It is straightforward to check that () is equal to l(p) = ( 5λ Q λ λ Q Q + 5λ Q + 6 Y ) () = ( ) 5λ Q λ λ Q Q + 5λ Q + 6 4 B c. Expression () is independent of ϕ which completes the proof. Remark. Note that Theorem is closely related to results obtained in [5, Section 7]. The RMF frame has a property that it does not rotate about the tangent of a curve. More precisely, the first component ω = ḟ (t) f 3 (t) of the angular velocity vector ω is identically equal to zero. The component ω of the ERF frame F ER = (f, f, f 3 ) of a curve determined through the quaternion A can be written as where ω (t) = 4 α( t)3 + (α γ)( t) t + (β γ)( t)t + β t 3 A(t), () i= ( ) ( )) q, a α = λ (det q, c det, q, b q,3 d ( ) ( )) a q β = λ (det, c q det,, b q, d q,3 ( ) ( )) q, q γ = λ λ (det, q, q det,. q, q, q,3 q,3 In order to approach the ERF frame of a curve as close as possible to the RMF frame of the same curve, we will minimize the integral min ϕ [ π,π) 9 ω (t) dt. (3)

Similar minimization has been done in [5] and [8], e.g. For a numerical computation of the minimum (3), the integral must first be approximated using some quadrature rule (Simpson, Gauss, etc.). A minimum of the approximated integral can then be computed using a gradient method or some other Newton type method. Asymptotic analysis from Section 4 provides very good starting values for this nonlinear minimization problem. Equations (9) show that there exists a three-parameter family of solutions of the interpolation problem considered. The following lemma reveals a symmetry between choosing ±λ i. Lemma. Let p (t; λ, λ ) denote the PH quintic interpolant with the parameter ϕ = ϕ(λ, λ ) computed by minimizing the integral (3). Then p (t; λ, λ ) = p (t; λ, λ ) and ϕ( λ, λ ) = { ϕ(λ, λ ) + π, ϕ(λ, λ ) [ π, ) ϕ(λ, λ ) π, ϕ(λ, λ ) [, π). Proof. It follows straightforwardly from (), (5), (9) and (). 4. Computation of free parameters 4.. C interpolation The first column of the ERF frame at each point is the normalized tangent vector of a curve p. This implies that the spline composed of PH curves defined in the previous section is globally G. In some applications it might be more appropriate to have a C smoothness. Therefore the interpolation problem must be extended in such a way that a curve p also satisfies ṗ() = d, ṗ() = d, where d and d are prescribed derivatives at interpolation points. By (7), this determines the values of λ and λ as d i λ i = Q i = d i, i =,. (4) It remains only to compute the parameter ϕ by minimizing (3).

Let us now analyse this C interpolation scheme for the data taken from a smooth parametric curve. Let f : [, h] R 3, s f(s), be a smooth parametric curve parameterized by the arc-length with nonvanishing curvature. Further, let ψ : [, ] [, h], t ht, be the reparameterization, and R(s) := (R (s), R (s), R 3 (s)) R 3 3 the RMF frame of f at s. Our goal is to compute a quintic PH polynomial curve p that interpolates the points p() = f(ψ()) = f() =: P, p() = f(ψ()) = f(h) =: P, (5) the frames and also the derivatives dp() dt = d(f ψ)() dt F = R(ψ()), F = R(ψ()), (6) = h df() ds, dp() dt = d(f ψ)() dt = h df(h) ds. (7) Interpolation of derivative directions is already included in (6), but conditions (7) additionally imply the values for λ and λ. Without loos of generality, we may assume f() =, f () =, f () = f (). (8) Suppose that the curvature κ and the torsion τ of the curve f at s = expand as κ(s) = κ +κ s+ κ s + κ 3 3! s3 +O(s 4 ), τ(s) = τ +τ s+ τ s + τ 3 3! s3 +O(s 4 ), where κ >. Then (see []) the Frenet-Serret formulae give an expansion of the curve, simplified by the assumptions (8) to s 6 κ s 3 κ 8 κ s 4 f(s) = κ s + κ 6 s 3 + 4 ( κ3 τ κ + κ ) s 4 + O ( s 5). (9) κ 6 τ s 3 + (κ 4 τ + κ τ ) s 4

The first component ω of the angular velocity vector ω of the Frenet frame is in the case of the arc-length parameterization equal to the torsion. From the angular deviation θ(s) := s τ(t)dt we obtain the RMF frame R as R = t, R = cos θ n sin θ b, R 3 = sin θ n + cos θ b, where (t, n, b) is the Frenet frame of f. From R() and R(h), R() =, () κ h κ h κ h κ τ h R(h) = κ h + κ h κ h + O ( h 3), () τ h we can by () compute the corresponding unit quaternions Q and Q which expand as Q = (,,, ), ( Q = 8 κ h 8 κ κ h 3, 4 κ τ h 3, ( 4 κ τ h + 6 κ τ ) κ τ h 3, κ h + 4 κ h + ) ( ) κ 3 48 4τ κ + 4κ h 3 + O ( h 4). () From (4) and (7) we obtain the parameters λ and λ as λ = h, λ = h. (3) The unknown quaternion A is by (9) given as A = Ã + O ( h 7/), where (5 sin(ϕ) + 3) h + 3 3 (sin(ϕ) + )κ h 5/ 5 Ã = cos(ϕ) h 3 3 cos(ϕ)κ h 5/ 5 cos(ϕ)κ 8 h 3/ + 3 (cos(ϕ)κ 6 + (sin(ϕ) + )κ τ ) h 5/ (5 sin(ϕ) + 3)κ 8 h 3/ 3 ((sin(ϕ) + )κ 6 cos(ϕ)κ τ ) h 5/ and ω, given in (), expands as ω (t) =, (t ) cos(ϕ) 5(t ) t cos (ϕ) + (5t 5t + + 5(t )t sin(ϕ)) + O ( h ).

In order to have ω as small as possible for every t [, ] and h small enough, we have to choose ϕ = ± π. For ϕ = π, and ω (t) = 4 τ ( κ 6t t + 3 ) h 3 + O ( h 4) ω (t)dt = 3 864 κ4 τ h 6 + O ( h 7). (4) For ϕ = π, ω (t) = 4 τ κ (4t t + 3) (t t + ) h3 + O ( h 4), but the integral ω (t)dt diverges, therefore this choice is not appropriate. For λ = h, λ = h, ϕ = π, the interpolant p expands as th 6 t3 κ h 3 p(t) = t κ h + 6 t3 κ h 3 + O ( h 4), 6 t3 κ τ h 3 and the parametric distance reads as p f ψ = = h4 36κ 536 κ + (κ 3 + 4τ κ 4κ ) + 6 (κ τ + κ τ ) + O ( h 5). The results are summarized in the next theorem. Theorem. Let f : [, h] R 3, s f(s), be a smooth parametric curve parameterized by the arc-length with the expansion (9), and let ψ : [, ] [, h], t ht. The PH curve p that satisfies (5) (7) and is defined by (4), (5) and (9), with parameters chosen as λ = h, λ = h, ϕ = π, approximates f with the asymptotic approximation order h 4. Furthermore, the first component ω of the angular velocity vector ω tends to zero with the order h 3, and ω (t) dt = O ( h 6). 3

The curve f defined by (9) is rotated in such a way that the RMF frame at s = is the identity matrix. Suppose that the curve is rotated by some matrix U, f Uf, and let Q U = (q U,, q U,, q U,, q U,3 ) be the corresponding quaternion. The data then change to P U P, Q Q U Q, Q Q U Q, and the unknown quaternion A must therefore be multiplied by Q U too. Unfortunately, the solution (9) is not invariant with respect to a quaternion multiplication and as a consequence the optimal angle ϕ changes. The asymptotic expansions in this case imply ϕ = c + c h + c h + O ( h 3) ( ) qu,, c = arctan, (5) where c and c are some more involved constants that depend only on q U,i, κ, κ and τ. Similarly as before, it can be proven that for λ = h, λ = h and ϕ chosen by (5) the conclusions of Theorem hold. Remark. Asymptotic analysis provides a very good starting value ϕ for the nonlinear minimization problem (3) for general data. Namely, ( ) q, ϕ start = arctan. (6) The asymptotic results will now be confirmed with a numerical example. Let the data be sampled from a spatial curve f(s) = q, q U, ( log ( + s) cos s, log ( + s) sin s, + s ) T, s [, h], (7) at s = and s = h. Recall that the frames F and F are computed as RMF frames of f at s = and s = h. The parameters λ i for the interpolant p are determined by (4) and (7), and ϕ is obtained by minimizing (3) using (6). The first part of Table shows the values of λ i, ϕ and the distance between the optimal ϕ from the starting value (6) for different values of h. In the second part of the table the values of the integral (3) and the parametric distance between f and p together with the decay exponent are 4

shown. Note that the decay exponent is computed as the binary logarithm of the quotient of two consecutive measurements. It tends to the order of approximation as h approaches zero. The numbers numerically confirm the results of Theorem. Fig. (left) shows the RMF frame of the curve f and the ERF frame of the interpolant p for h =. The curves f and p are almost indistinguishable and so are the frames. The graph of ω at the optimal ϕ is shown in Fig. (right). Table : Approximation error between the curve (7) and the C interpolant p together with values of free parameters and the value of the integral (3). h λ λ ϕ ϕ ϕ start.53.358.3.77.676.3369.37 3.5.465.3387 3.96 4 4.3536.3364.3389 4.4659 5 8.5.43.339 5.8587 6 6.768.74.339 7.48 7 3 ω (t)dt Decay exponent Approx. error Decay exponent h 5.655 4 / 5.43 3 /.95 5 4.7449 6.467 4 3.7 5.786 7 5.895 4.3397 5 3.896 4.86 8 5.7.4433 6 4.57 8.8 5.94.383 7 4.447 6.87 5.97 8.64 9 4.99 3 4.. G interpolation Let us now return to the problem from Section 3. A PH curve p is determined by three shape parameters λ, λ and ϕ [ π, π), that will be chosen in two steps. First the parameters λ and λ will be computed and secondly the optimal ϕ will be determined. The spline composed of such PH curves is globally G smooth. As stated in Theorem the parameters λ and λ influence the length of the resulting curve p. Following the asymptotic results from Section 4. we 5

.4...4.6.8.. Figure : In the left figure, the RMF frame of the curve (7) for h = (gray) and the ERF frame of the C interpolant (black) are shown. The right figure shows the graph of ω at the optimal ϕ. can select λ and λ accordingly to (3) as λ i = P P, i =,. (8) Another way to select λ and λ is to choose in advance the length l(p) of the interpolant p. By prescribing the length of p, the equation () determines the relation between parameters λ and λ that must be satisfied. The next lemma gives a closed form solution of the equation () under the assumption λ = λ. Lemma 3. Let us assume that λ = λ and let L R, L P. Then l(p) = L iff λ = λ = ± Λ, (9) Λ := η + ξ L (η + ξ L) 4 (ξ ζ) (L P ), (ξ ζ) where ξ := 4 S,3, ζ := ( ρ 576 + ρ + (S, S,3 ) ), η := (S,3 S,, ρ, ρ ) P, 6

and S j,k := k ( q,i + q,i + (q,i q,i ) ), j < k 3, i=j ( ) ( ) x y x y ρ(x, y, z, w) := det 3 det, z w w z ρ := (ρ(q,, q,, q,3, q,3 ) + ρ(q,, q,, q,, q, )), ρ := (ρ(q,, q,, q,3, q,3 ) ρ(q,, q,, q,, q, )). Proof. It is easy to see that ξ, ζ, η 4 ζ P ξ ζ. The relation () can be simplified to and l(p) ξλ = ζλ + η λ + P, (3) where λ := λ. It is straightforward to see that inserting λ = Λ into (3) implies l(p) = L. Let us now assume that l(p) = L. By squaring both sides of (3) we obtain a quadratic equation in λ. Using the cylindrical decomposition, one can prove that only the solution λ = Λ satisfies (3). In order to have λ = λ well defined, it remains to prove that Λ R and Λ. The term under the square root in Λ, X := (η + ξ L) 4 ( ξ ζ ) ( L P ), can be considered as a quadratic function in L having both roots complex or equal, since (ξ ζ) (η 4ζ P ). The positive leading coefficient implies that X and thus Λ R. Under the assumption L P, it follows X (η + ξ L), which implies Λ. The proof is completed. Remark 3. Using the result of Lemma, one can always choose λ = λ = + Λ. The influence of the length L on the shape of the interpolant p is shown in Fig.. For more examples see Section 5. Once the parameters λ and λ are determined, it remains to compute ϕ so that the ERF frame of a curve p will be as close as possible to the RMF frame of p. As suggested in Section 3, we have to minimize the integral (3). This minimization problem is clearly nonlinear. To find the solution numerically, we can approximate the integral with some Gaussian quadrature 7

Figure : The interpolant p (black curve) with parameters λ and λ chosen by (8) and three different solution curves (gray curves) with prescribed lengths.6, 3, 3.5, and λ = λ given by (9). and then apply some minimization solver. The initial value for an iterative procedure is provided by (6). Let us conclude this section by considering the asymptotic analysis. It turns out that the result for G interpolation is similar as in the C case. Theorem 3. Suppose that the assumptions of Theorem hold. The PH curve p that satisfies (5) (6) and is defined by (4), (5) and (9), with parameters chosen as λ i = f(h) f(), i =,, ϕ = π, (3) approximates f with the asymptotic approximation order h 4. Furthermore, the first component ω of the angular velocity vector ω tends to zero with the order h 3, and ω (t) dt = O ( h 6). Proof. Recall the expansions (9), (), () and () from Section 4.. The parameters λ and λ defined by (3) then expand as λ i = h 48 κ h 5/ 48 κ κ h 7/ + O ( h 9/), i =,. Similarly as for the C interpolation in Section 4., one can see that ω, defined in (), is of order h 3 for ϕ = π and that (4) holds. In this case 8

the PH curve p is equal to th t 4 (6t 3t + ) κ h 3 t 48 (3t3 + t 9t + ) κ κ h 4 t κ h + 6 t3 κ h 3 + 48 t (( 3t ) κ 3 + ( t) (τ κ κ )) h 4 + O ( h 5). 6 t3 κ τ h 3 + 4 t (t ) (κ τ + κ τ ) h 4 The distance between curves p and f is measured as a parametric distance dist(p, f) = inf p f Ψ, Ψ where Ψ : [, ] [, h] is a regular reparameterization. For Ψ(t) = th 4 t ( t 3t + ) κ h 3 4 t ( t 3t + ) κ κ h 4 + O ( h 5), curves p and f Ψ have a second order contact at t = and t =, and the distance is dist(p, f) h4 9κ 768 κ + (3κ 3 + τ κ κ ) + 4 (κ τ + κ τ ) +O ( h 5). This concludes the proof. To confirm the asymptotic results numerically, let us use the same example as for the C interpolation in Section 4.. The lengths are computed by (8) and ϕ is obtained by minimizing (3) using (6). The results are shown in Table and in Fig. 3. Again the numbers numerically confirm the results of Theorem 3......4.6.8...3 Figure 3: In the left figure, the RMF frame of the curve (7) for h = (gray) and the ERF frame of the G interpolant (black) are shown. The right figure shows the graph of ω at the optimal ϕ. 9

Table : Approximation error between the curve (7) and the G interpolant p together with values of free parameters and the value of the integral (3). h λ λ ϕ ϕ ϕ start.8986.8986.35.38.6498.6498.3368.68 3.4746.4746.3386 3.4378 4 4.3436.3436.3389 4.676 5 8.463.463.339 6.67 6 6.754.754.339 7.5793 7 3 ω (t)dt Decay exponent Approx. error Decay exponent h 4.573 4 /.39 /.6673 5 4.7776 4.95 3.738 5.66 7 4.9846 3.7743 4 3.759 4.65 8 5.633.33 5 4.89 8.794 5.89.858 6 4.66 6.8673 5.9653 7.69 8 4.787 3 5. Numerical examples Let us conclude the paper with some numerical examples, which illustrate the theoretical results obtained in previous sections. First let us compare our G interpolant p with parameters λ, λ chosen by (8) and ϕ computed by (3), with quintic PH curves having the exact RRMF frame on three different examples considered in [6, p. 8-3]. Let P = (,, ) T and let first F =, F =.847.36.559.36.559.847.559.847.36 (3) The solution curves are shown in Fig. 4. On the top, both solutions having RRMF frame are presented, bottom left figure shows the interpolant p with the ERF frame, and on the bottom right, all three curves are presented together. It can be concluded that our G quintic is competitive with interpolants obtained in [6]. The same comparison for.

Figure 4: G quintic interpolants with the RRMF frame (top), interpolant p with the ERF frame (bottom left), and all three solution curves together (bottom right), for data (3). F = 3 5 5 5 5 5.536.898 5.973.536, F =.5833.869.794.638.5.5833.5.8333.869 (33) is shown in Fig. 5. The conclusions are the same as for the previous example. Finally, let Figure 5: G quintic interpolants with the RRMF frame (top), interpolant p with the ERF frame (bottom left), and all three solution curves together (bottom right), for data (33). F = 3 3, F =. (34)

For these data no quintic PH interpolant having the RRMF frame exists ([6]), while our interpolant with the ERF frame is shown in Fig. 6. Figure 6: A G quintic PH interpolant together with its ERF frame for data (34). As another example, let us consider a G spline interpolation. The data are taken from a curve g : R R 3, g(t) = 4 ( log( + t) sin(πt), log( + t) cos(πt), t ) T, as P i := g ( i 3), i =,,, 3. Further let Fi, i =,,, 3, be the Frenet frames of g at points P i. In order to construct a quintic G Hermite spline, which interpolates the given points and frames, we have to determine three free parameters λ k, λ k and ϕ k for each polynomial segment p k, k =,, 3. Three different cases are considered. For each of them, the parameters ϕ k are chosen in such a way that the integral (3) on every polynomial segment is minimal, but the choice of λ k, λ k, k =,, 3, is different for each case. Firstly, let us follow the asymptotic analysis and choose λ k = λ k = P k P k, k =,, 3. The obtained G spline is shown in Fig. 7 (left). The parameters λ k and λ k Figure 7: G Hermite splines with parameters λ k, λ k and ϕ k, k =,, 3, given in Table 3.

can be selected also in such a way that the lengths l k := l (p k ), k =,, 3, of all three polynomial segments are prescribed in advance. For the second case let us choose (l, l, l 3 ) = (.6,.5, 3.6). The parameters λ k and λ k are then computed from (9). This G spline is shown in Fig. 7 (middle). As the last case, let (l, l, l 3 ) = (.3,.3, 3.4). The solution is presented in Fig. 7 (right). The corresponding values for shape parameters are given in Table 3. Figure 8: A motion of a rectangular parallelepiped (left) and an example of a swept surface (right) for the given G Hermite motion data. Table 3: The values of shape parameters λ k, λ k and ϕ k, k =,, 3, for all three cases. λ = λ ϕ λ = λ ϕ λ 3 = λ 3 ϕ 3 case.66 -.59.48977 -.3447.8674 -.7464 case.646 -.33.83 -.636.7973 -.7479 case 3.6993 -.977.359 -.366.38596 -.7454 It is straightforward to use the presented interpolation scheme for rigid body motions and swept surface construction. In Fig. 8 (left) a motion of a rectangular parallelepiped which interpolates the given positions (black) is shown. A center of mass traverses the interpolating curve and rotations are specified by the ERF frame of the interpolant. An example of swept surface is shown in Fig. 8 (right). 3

6. Conclusion A method for computing rational motions of a rigid body has been presented. It is based on the construction of spatial quintic Pythagoreanhodograph spline curves that interpolate 3D points and corresponding frame orientations, and posses rational orthogonal frames called Euler-Rodrigues frames. A solution of a polynomial Hermite interpolation problem is expressed in a closed form with three free parameters. They are used for minimizing the length of the curve and to approach the Euler-Rodrigues frame as much as possible to the rotation minimizing one. The method can be used in several applications connected to motions of a rigid body, such as computer animation, robot manipulation, construction of a smooth camera motion, spatial path planning in manufacturing, etc. Another important application is a swept surface construction that attaches to the isogeometric analysis for solving partial differential equations. Similar interpolation schemes can be derived using Pythagorean-hodograph spline curves of degree n > 5. An advantage of using higher degrees is that the interpolants can have Euler-Rodrigues frames equal to rotation minimizing frames. Since the equations are highly nonlinear the analysis becomes more complicated and this is a topic for a future research. [] H.I. Choi, C.Y. Han, Euler-Rodrigues frames on spatial Pythagoreanhodograph curves, Comput. Aided Geom. Design 9 () 63 6. [] G. Farin, J. Hoschek, M.S. Kim, Handbook of Computer Aided Geometric Design, Elsevier, Amsterdam, first edition,. [3] R.T. Farouki, Pythagorean-hodograph curves: algebra and geometry inseparable, volume of Geometry and Computing, Springer, Berlin, 8. [4] R.T. Farouki, Quaternion and hopf map characterizations for the existence of rational rotation- minimizing frames on quintic space curves, Adv. Comput. Math. 33 () 33 348. [5] R.T. Farouki, C. Giannelli, C. Manni, A. Sestini, Identification of spatial PH quintic Hermite interpolants with near-optimal shape measures, Comput. Aided Geom. Design 5 (8) 74 97. 4

[6] R.T. Farouki, C. Giannelli, C. Manni, A. Sestini, Design of rational rotation-minimizing rigid body motions by hermite interpolation, Math. Comp. 8 () 879 93. [7] R.T. Farouki, C.Y. Han, Rational approximation schemes for rotationminimizing frames on Pythagorean-hodograph curves, Comput. Aided Geom. Design (3) 435 454. [8] R.T. Farouki, M. al Kandari, T. Sakkalis, Hermite interpolation by rotation-invariant spatial Pythagorean-hodograph curves, Adv. Comput. Math. 7 () 369 383. [9] R.T. Farouki, T. Sakkalis, Rational rotation-minimizing frames on polynomial space curves of arbitrary degree, Jour. Symb. Comput. 45 () 844 856. [] G. Jaklič, J. Kozak, M. Krajnc, V. Vitrih, E. Žagar, An approach to geometric interpolation by Pythagorean-hodograph curves, Adv. Comput. Math., to appear (). [] F. Klok, Two moving coordinate frames for sweeping along a 3D trajectory, Comput. Aided Geom. Design 3 (986) 7 9. [] E. Kreyszig, Differential geometry, Dover Publications Inc., New York, 99. Reprint of the 963 edition. [3] C. Mäurer, B. Jüttler, Rational approximation of rotation minimizing frames using Pythagorean-hodograph cubics, J. Geom. Graph. 3 (999) 4 59. 5