Qua Tern Ion Curves

9
A General Construction Scheme for Unit Quaternion Curves with Simple High Order Derivatives 1 Myoung-Jun Kim 2 , Myun g-S oo Kim 3 , and Sung Yong Shin 2 2 Korea Advanced Institute of Science and Technology (KAIST) 3 Pohang University of Science and Technology (POSTECH) ABSTRACT Thi s pap erpropo sesa newcla ss of uni t qua ter nio n cur vesin 3 . A general method is developed that transforms a curve in 3 (de- ned as a weighted sum of basis functions) into its unit quaternion analogue in 3. Appl ying the metho d to well -kno wn spline curves (such as B´ ezier, Hermite, and B-spline curves), we are able to construct various unit quaternion curves which share many im- portant diff erential properties with their original curve s. Many of our naive common beliefs in geometry break down even in the simple non-Euclidean space 3 or 3 . For e xam- ple, t he de Cast eljau type co nstructio n of cubic B-spline quaternio n curves does not preserve 2 -continuity [10]. Through the use of decompositi on into simple pri mitive qu aternion curves, our quater- nioncurves pres erve mos t of thealgebr aicand dif fere nti al prop ert ies of the original spline curves. CR Descriptors: I.3.5 [Computer Graphics]: Computat ional Geometry and Object Modeling – Curve, surface, solid, and object representation, – Geometric algorithms. Keywords: Quaterni on, rotation, orientation, 3 , B ´ ezier, Hermite, B-spline 1 INT RODUCTION In computer animation, it is very important to have appropriate tool s to produce smooth and natu ral moti ons of a rig id body. A rigid motion in 3 canbe rep resent ed by a Car tes ianproductof two comp onent cur ves: one in the Euclid ean space 3 and the other in the rotation group 3 [3, 12] . The cu rve i n 3 represents the center position of the rigid body, and the other curve in 3 represents its orient ation. Often, techniques for specifying a rigid mot ion constr uct the two curves indep enden tly . It is rel ative ly easy to produce smooth cur ves in the Euclidean space. B-spline, Hermite, and B´ ezier curves exemplify well-known techniques for constructing position curves in 3 . However , smooth ori entation curves in 3 are much more difcult to construct. 1 This research was partially supported by the Korean Ministry of Science and Te chnologyunder the contract 94-S-05-A-03of STEP 2000 and TGRC-KOSEF . 2 Computer Science Department, KAIST, T aejeon 305-701, Korea. 3 Dept. of ComputerScience, POSTECH, Pohang 790-784,Korea. E-mail: mjkim, syshin @jupiter.kaist.ac.kr and mskim@vision .postech.ac.kr . The spline curves in 3 are usually dened in two diff erent but equi vale nt ways: i.e. , eithe r as an algeb rai c const ruct ion usingbasis functions or as a geometric construction based on recursive linear interpol ations [2]. This paper proposes a g eneral framework w hich extends the algebraic construction methods to 3 . Most of the prev ious meth ods are based on extendi ng the line ar int erpo latio n in 3 to the slerp (spherical linear interpol ation) in 3 [14, 16, 17, 18]. The two (i.e., algebraic and geometr ic) constructi on schemes generate identical curves in 3 ; however, this is not the case in the non-Euclidean space 3 [10]. Many of our commonplace beli efs in geometr y breakdown in the non-Euc lid ean space 3. When the r ecursive curv e constructi on is not based on a simple closed form algebraic equation, it becomes extremely difcult to do any extensive analysis on the constructed curv e. For example, consider the problem of computi ng the rst derivati ve of the cubic ezi er qua te rni on cur ve or the squadcurve gen era tedby a recur siv e slerp constructi on [17, 18]. Though Shoemake [17 , 18] postulates correct rst derivatives, the quaternion calculus employed there is incor rect (se e [9] for more details). Kim, Kim, and Shin [9] developed a correct quaternion calculus for the rst derivatives of unit quater nion curv es; howe ver, an exte nsio n to the second derivatives becomes muchmore compl ex (also see [11] for a relat ed quaternion calculus on blending-t ype quaternion curves). More seriously, the 2 -continuity of a spline curve in 3 may not carry over to 3. Furt hermore, the curve convers ion be- twee n two dif fere nt spl ine curv es, e.g. , fr om a cubi c ezi er cur veto the corr espon dingcubicB-splin e curv e, may notwork outin 3 [10]. Kim, Kim, and Shin [10] show that there is no 2 -continuity guar ante ed for the cubic B-spl ine quater nion curv es whi ch a re gen- erat ed by the recu rsi ve sler p construc tio n of Schlag [16 ]. Similarl y, the B-spl ine quaterni on curv e of Nie lsonand Heiland [13 ] al so fails to have 2 -continuity (see [10] for more details). In this paper, we take an important step toward generalizing the algebraic formulation of spline curves in 3 to similar ones in 3 . In the new algebr aic formulat ion, the comp utat ion of high order derivatives becomes almost as easy as that of the spline curves in 3 . We show that the quate rni on curves gener ated in this way preserve many important differential properties of their original curves in 3 . They are dened in simple closed algebraic forms of quaternion equations, and they have the same degrees of geometric continuit y as their counterparts in 3 . As a demonstration of the feasibility of our proposed method, we rst construct a B´ ezier quaternion curve with control unit quat ernions. Then, th e cubic B´ ezier quaternion curve is used to const ruct a Hermit e quat erni on curve. W e also constr uct a -th order B-spline quaternion curve which is 2 -continuo us and lo- cally control lable. There are many other spline cur ves which can be dene d by weig hted sums of cont rol point s; our constru ction

Transcript of Qua Tern Ion Curves

Page 1: Qua Tern Ion Curves

8/8/2019 Qua Tern Ion Curves

http://slidepdf.com/reader/full/qua-tern-ion-curves 1/8

A General Construction Scheme for Unit Quaternion Curves

with Simple High Order Derivatives1

Myoung-Jun Kim2, Myung-Soo Kim3, and Sung Yong Shin2

2

Korea Advanced Institute of Science and Technology (KAIST)3Pohang University of Science and Technology (POSTECH)

I n  P r o c . o f S I G G R A P H ' 9 5  , p p . 3 6 9 { 3 7 6 .  

ABSTRACT

This paperproposesa newclass of unit quaternion curvesin S O  (  3 )  .

A general method is developed that transforms a curve inR 

3 (de-fined as a weighted sum of basis functions) into its unit quaternionanalogue in S O  (  3 )  . Applying the method to well-known splinecurves (such as Bezier, Hermite, and B-spline curves), we are ableto construct various unit quaternion curves which share many im-portant differential properties with their original curve s.

Many of our naive common beliefs in geometry break downeven in the simple non-Euclidean space S 

3 or S O  (  3)  . For exam-ple, the de Casteljau type construction of cubic B-spline quaternioncurves does not preserve C 

2-continuity [10]. Through the use of decomposition into simple primitive quaternion curves, our quater-nioncurves preserve most of thealgebraicand differential propertiesof the original spline curves.

CR Descriptors: I.3.5 [Computer Graphics]: ComputationalGeometry and Object Modeling – Curve, surface, solid, and objectrepresentation, – Geometric algorithms. Keywords: Quaternion,rotation, orientation, S O  (  3 )  , Bezier, Hermite, B-spline

1 INTRODUCTION

In computer animation, it is very important to have appropriatetools to produce smooth and natural motions of a rigid body. Arigid motion in R 

3 canbe represented by a Cartesianproductof twocomponent curves: one in the Euclidean space R 

3 and the otherin the rotation group

S O  ( 

3) 

[3, 12]. The curve inR 

3 representsthe center position of the rigid body, and the other curve in S O  (  3 ) 

represents its orientation. Often, techniques for specifying a rigidmotion construct the two curves independently. It is relativelyeasy to produce smooth curves in the Euclidean space. B-spline,Hermite, and Bezier curves exemplify well-known techniques forconstructing position curves in R 

3. However, smooth orientationcurves in S O  (  3 )  are much more difficult to construct.

1This research was partially supported by the Korean Ministry of Science andTechnologyunder the contract 94-S-05-A-03of STEP 2000 and TGRC-KOSEF.

2Computer Science Department, KAIST, Taejeon 305-701, Korea.3Dept. of ComputerScience, POSTECH, Pohang 790-784,Korea.

E-mail: f  mjkim, syshing  @jupiter.kaist.ac.kr and mskim@vision .postech.ac.kr.

The spline curves inR 

3 are usually defined in two different butequivalent ways: i.e., either as an algebraic construction usingbasisfunctions or as a geometric construction based on recursive linearinterpolations [2]. This paper proposes a general framework whichextends the algebraic construction methods to S O  (  3 )  . Most of theprevious methods are based on extending the linear interpolation inR 

3 to the slerp (spherical linear interpolation) in S O  (  3 )  [14, 16, 17,18]. The two (i.e., algebraic and geometric) construction schemesgenerate identical curves in R 

3; however, this is not the case inthe non-Euclidean space S O  (  3 )  [10]. Many of our commonplacebeliefs in geometry breakdown in the non-Euclidean space

S O  ( 

3) 

.When the recursive curve construction is not based on a simple

closed form algebraic equation, it becomes extremely difficult todo any extensive analysis on the constructed curve. For example,consider the problem of computing the first derivative of the cubicBezier quaternion curve or the squadcurve generatedby a recursiveslerp construction [17, 18]. Though Shoemake [17, 18] postulatescorrect first derivatives, the quaternion calculus employed thereis incorrect (see [9] for more details). Kim, Kim, and Shin [9]developed a correct quaternion calculus for the first derivativesof unit quaternion curves; however, an extension to the secondderivatives becomes muchmore complex (also see [11] for a related

quaternion calculus on blending-type quaternion curves).More seriously, the C 

2-continuity of a spline curve in R 

3 maynot carry over to S O  (  3 )  . Furthermore, the curve conversion be-tween two different spline curves, e.g., from a cubic Bezier curve tothe correspondingcubicB-spline curve, may notwork outin S O  (  3 ) 

[10]. Kim, Kim, and Shin [10] show that there is no C 

2-continuityguaranteed for the cubic B-spline quaternion curves which a re gen-erated by the recursive slerp construction of Schlag [16]. Similarly,the B-spline quaternion curve of Nielsonand Heiland [13] also failsto have C 

2-continuity (see [10] for more details).In this paper, we take an important step toward generalizing

the algebraic formulation of spline curves in R 

3 to similar onesin S O  (  3 )  . In the new algebraic formulation, the computation of high order derivatives becomes almost as easy as that of the splinecurves in R 

3. We show that the quaternion curves generated in

this way preserve many important differential properties of theiroriginal curves in

3. They are defined in simple closed algebraicforms of quaternion equations, and they have the same degrees of geometric continuity as their counterparts in R 

3.As a demonstration of the feasibility of our proposed method,

we first construct a Bezier quaternion curve with n  control unitquaternions. Then, the cubic Bezier quaternion curve is used toconstruct a Hermite quaternion curve. We also construct a k  -thorder B-spline quaternion curve which is C 

k  2-continuous and lo-cally controllable. There are many other spline curves which canbe defined by weighted sums of control points; our construction

Page 2: Qua Tern Ion Curves

8/8/2019 Qua Tern Ion Curves

http://slidepdf.com/reader/full/qua-tern-ion-curves 2/8

method is general in that all these spline curves are extendible totheir corresponding quaternion curves. Since it is possible to ma-nipulate the position curve as well as the corresponding orientationcurve in a unified manner, the modeling and manipulation of rigidmotions can be managed more conveniently.

The key to the success of our construction method is that thequaternion curve is formulated as a product of simple primitivequaternion curves: q  (  t  ) =  exp(  !  f  (  t  ) )  , i  =  1 ; : : : ; n   , for some

fixed angular velocity !  2  R 

3 and real valued function f  (  t  )  ,

where exp : R  3 !  S O  (  3 )  is an exponential map [3]. Eachprimitive curve, q  (  t  )  , represents a rotation about a fixed axis,

!  2  R 

3, for which the derivative formula has an extremelysimple form: q  (  t  ) =  exp(  !  f  (  t  ) ) (  !  f  (  t  ) ) =  q  (  t  ) (  !  f  (  t  ) )  .Since the chain rule can be applied to the quaternion product:q  (  t  ) =  q  1 (  t  )  q 

(  t  )  , the resulting differential formula has thesimplest expression that one can expect for unit quaternion curves.Furthermore, a similar technique can be used to obtain high orderderivatives of our quaternion curves. There have been many othermethods suggested for the construction of quaternion curves, in-cludingthe CAGD approaches based on constructing rational curveson the 3-sphere S 

3 [8, 20]. Nevertheless, no method has providedsuch a simple derivative formula. The only exception is the methodof Pobegailo[15] which constructs a C 

k  -continuousspherical curveas a product of 

(  k  + 

1) 

rotation matrices:R 

k  +  1 R 

: : : R   1. The gen-

erated curve is, however, essentially restricted to the Bezier typequaternion curve of our method.

The development of closed form equations for the second orderderivatives providesan important step toward solving the importantproblem of torque minimization for 3D rotations [1, 6, 7]. How-ever, the torque minimization problem requires much more. Theoptimal solution is given as a critical path in the problem of cal-culus of variations among a set of quaternion paths which satisfythe given conditions. For this purpose, we may need to extendthe quaternion curve construction scheme of this paper to that of quaternion surfaces and volumes. This is currently a difficult openproblem. Therefore, the important problem of torque minimizationfor 3D rotations has not been solved in this paper. Nevertheless, thebasic algebraic approach taken in this paper provides an importantconceptual framework for future research toward this goal.

The rest of this paper is organized as follows. In Section 2,we briefly review some useful concepts and definitions related tounit quaternions. Section 3 describes the main motivation of thiswork. Section 4 outlines our basic ideafor constructing unit quater-nion curves. Section 5 constructs the Bezier, Hermite, and B-splinequaternion curves and discusses their differential properties. Sec-tion 6 shows someexperimental results with discussions on possiblefurther extensions. Finally, in Section 7, we conclude this paper.

2 PRELIMINARIES

2.1 Quaternion and Rotation

Given a unit quaternionq  2  S 

3, a 3D rotationR 

2  S O  ( 

3) 

isdefined as follows:

(  p  ) =  q p q 

1for p  2  R 

3(  1) 

where p  = (  x ; y ; z  )  is interpretedas a quaternion (  0; x ; y ; z   )  andthequaternion multiplication is assumed for the products [3, 17, 18].Let q  = (  cos ˆv  sin   )  2  S 

3 , for some angle   and unit vector

ˆv  2  S 

2, thenR 

is the rotation by angle 2 

about the axis ˆv 

. Themultiplicative constant, 2, in the angle of rotation, 2   , is due to thefact that q  appears twicein Equation(1). Also note that R 

  R 

;

that is, two antipodal points, q  and ?  q  in S 

3, represent the samerotation in S O  (  3)  .

Thetwo spacesS 

3 andS O  ( 

3) 

have thesame localtopology andgeometry. The major difference is in the distance measures of thetwospaces S O  (  3 )  and S 

3. A rotation curve R 

q  t  ) 

2  S O  (  3 )  is twice

as longas the corresponding unit quaternion curve q  (  t  )  2  S 

3. When

a smooth rotation curve R 

q  t  ) 

has an angular velocity 2!  (  t  )  2  R 

3,

the unit quaternion curve q  (  t  )  2  S 

3 satisfies:

q  (  t  ) =  q  (  t  )  !  (  t  )  (  2 ) 

In this paper, we construct the unit quaternion curves in S 

3

, insteadof  S O  (  3 )  ; therefore, we interpret the velocity component !  (  t  )  of q  (  t  )  as the angular velocity, instead of 2 !  (  t  )  .

The unit quaternion multiplication is not commutative; the or-der of multiplication is thus very important. Let q  1 q  2 q 

bea sequence of successive rotations. When each q  is measured inthe global frame, the product q 

n  1 q  1 is the net rotation of successive rotations. However, when each q  is measured in thelocal frame, the final product

q  1 q  2 q 

represents the net rota-tion. Note that the latter is the same as the successive rotationsof  q 

n  1 q  2 q  1 in the global frame. Here, we assume eachrotation is specified in the local frame. This is simply for notationalconvenience; in the local frame, we can write the multiplications inthe same orderas the rotations. By reversingthe orderof quaternionmultiplications, the same construction schemes can be applied to

the quaternion curves defined in the global frame.

2.2 Exponential and Logarithmic Maps

Given a vector v  =    ˆv  2  R 

3, with ˆv  2  S 

2, the exponential:

exp(  v  ) = 

X  

=  0

v  = (  cos ˆv  sin   )  2  S 

3

becomes the unit quaternion which represent the rotation by angle2   aboutthe axis ˆv  , where v  is computed usingthe quaternion mul-tiplication [3, 11, 18]. The exponential map exp can be interpretedas a mapping from the angular velocity vector (measuredin S 

3) intothe unit quaternion which represents the rotation. When we limitthe domain of exp so that   <   , the map exp becomes 1-to-1 and

its inverse map log can be defined for unit quaternions. (See [9]for more details on exp and log.) The power of a unit quaternionq  with respect to a real valued exponent   is defined to be a unitquaternion: q 

 

=  exp(    log q  )  .Given twounit quaternions

q  1 andq  2, the geodesiccurve

 

q  1 q  2 2 

3 (which connects q  1 and q  2) has constant tangential velocitylog(  q 

11 q  2 )  . The geodesic curve equation is given by:

 

q  1 q  2 (  t  ) =  q  1 exp(  t  log(  q 

11 q  2 ) ) =  q  1 (  q 

11 q  2 ) 

(  3 ) 

The geodesic  

q  1 q  2 is also called the slerp (spherical linear inter-polation) between q  1 and q  2.

3 MOTIVATION

For a translational motion in R 

3, the position curve p  (  t  )  is repre-sented by:

p  (  t  ) = 

Z  

v  (  t  )  d t  +  p  0 (  4 ) 

where v  (  t  )  is thevelocity and p  0 is the initial position. This relationcan alsobe represented by the following linear differential equation:

p  (  t  ) =  v  (  t  )  ( 

5) 

However, as shown in Equation (1), the relation between q  (  t  )  and!  (  t  )  is non-linear: q  (  t  ) =  q  (  t  )  !  (  t  )  .

Page 3: Qua Tern Ion Curves

8/8/2019 Qua Tern Ion Curves

http://slidepdf.com/reader/full/qua-tern-ion-curves 3/8

One of the most important problems in aero-space engineeringis how to find a torque optimal rotational path which connects thestart and target orientations [7]. Many numerical methods havebeen suggested to find the optimal path, in which Equation (1)plays an important role as governing equation [6]. Barr et al. [1]also raised torque optimization as a significant problem in computeranimation, and they constructed a torque optimal piecewise slerpquaternion path (i.e., as a sequence of discrete unit quaternions) byusing a non-linear optimization technique. There still remains the

important open problem of how to construct such a torque optimalpath with piecewise spline quaternion curves which have simpleclosed form equations. An immediate open problem concerns thecomputation of high order derivatives of a unit quaternion curve. Inthis paper, we resolve the crucial problem of how to formulate thequaternion curves and their high order derivatives as closed formequations.

For a unit quaternion curve q  (  t  )  2  S 

3, we may reformulate thecurve in the following equivalent form:

q  (  t  ) = 

exp( 

log(  q  (  t  ) ) ) 

By applying the chain rule to this equation, we obtain the firstderivative formula:

q  (  t  ) =  d  (  exp)  log q  t  ) ) 

 

d t 

log(  q  (  t  ) ) 

 

where d  (  exp)  log q  t  ) ) 

is the differential (i.e., Jacobian matrix) of exp. Kim, Kim, and Shin [9] used this formula to provide simpleC 

1-continuity proofs for various previous methods [11, 17, 18].The second and high order derivative formulas, however, becomeextremely complex even with this representation. Moreover, forgeneral quaternion curves q  (  t  )  , their logarithmic curves, log (  q  (  t  ) )  ,also have very complex formulas. In this paper, we exploit simpleprimitive quaternion curves q  (  t  )  which allow simple formulas forboth the high order derivatives and the logarithmic curves.

Shoemake [18] used the formula:

d q 

 

=  q 

 

log(  q  )  d   +  q 

  1d q (  6) 

In general, this formula is incorrect. For example, Equation (6)claims that: d q 

2=  2 q d q  . However, we have:

d q 

2=  d  (  q q  ) =  d q q  +  q d q  6= 

2q d q 

since the quaternion multiplication is not commutative (also see [9]for more details). Nevertheless, there is a special case where thisformula works. When the quaternion curve q  (  t  )  is restricted to the

rotation around a fixed axis!  2  R 

3: i.e.,

q  (  t  ) =  exp(  !   (  t  ) ) 

for a real-valued function   (  t  )  , q  (  t  )  has a simple form:

q  (  t  ) =  exp(  !   (  t  ) ) (  !   (  t  ) ) =  q  (  t  ) (  !   (  t  ) ) 

which is equivalent to the formula of Equation (6) in this specialcase. Higher order derivatives of 

q  (  t  ) 

are also easy to compute bythe chain rule.

To makegood use of this simple differential property,all the unitquaternion curves of this paperwillbe constructedas the products of 

primitive quaternion curves: q  (  t  ) =  exp(  !    (  t  ) )  , i  =  1; : : : ; n   ,

for a fixed angular velocity!  2  R 

3 and a real valued function  (  t  )  . Since the chain rule can be applied to the quaternion prod-uct: q  (  t  ) =  q  1 (  t  )  q 

(  t  )  , the quaternion curve derivative canbe obtained in an extremely simple form. Furthermore, applyinga similar technique recursively, high order derivatives can also beobtained in simple forms. In this paper, we construct each com-ponent quaternion curve q  (  t  )  to be C 

k  -continuous by choosing

k  -continuous basis function   (  t  )  . Therefore, their quaternion

product q  (  t  ) =  q  1 (  t  )  q 

(  t  )  becomes C 

k  -continuous.

q0

ω1

q1

ω2

q2

ωn

qn

Figure 1: Piecewise Slerp Interpolation of f  !  g  .

4 BASIC IDEA

4.1 Cumulative Form

Given a sequence of points p  0 p  1 p 

2  R 

3, the simplest C 

0-continuous curve p  (  t  )  2  R 

3, which interpolates each point p  att  =  i 

, is given by the following linear interpolation:

p  (  t  ) =  p  0 +    1 (  t  )  ∆ p  1 +    2 (  t  )  ∆ p  2 +  +   

(  t  )  ∆ p 

=  p  0 + 

=  1  (  t  )  ∆p 

where∆ p  =  p  ?  p  1

  (  t  ) = 

0 if  t < i 

t  ?  i  if  i    t < i  +  11 if 

t    i  + 

1

Similarly, given a sequence of unitquaternions q  0 q 

2  S 

3,we can constructa C 

0-continuous unit quaternion curve q  (  t  )  2  S 

3,which interpolates each unit quaternion q  at t  =  i  , as follows:

q  (  t  ) =  q  0 exp(  !  1   1 (  t  ) ) 

exp(  !  2   2 (  t  ) ) 

exp(  ! 

 

(  t  ) ) 

=  q  0

=  1exp

(  !    (  t  ) ) 

where!  = 

log(  q 

11 q  ) 

This is a piecewise slerp (spherical linear interpolation) of f  q  g  (seeFigure 1). In the rotational space, a slerp implies a rotation with aconstant angular velocity (around a fixed rotation axis). The slerpcurve segment joining

andq 

+  1 is the geodesic interpolation,which is given by: q  exp(  !    (  t  ) )  , based on Euler’s theorem of principal rotation.

At this point, we may generalize f    g  to other functions, ratherthan a piecewise linear function, so that the resulting quaternioncurve becomes

k  -continuous while interpolating the given se-quence of unit quaternions. The two sequences f    g  and f  !  g  canbe viewed as basis functions and their coefficients, respectively.We call q  0

exp(  !    )  the cumulative form of  q  (  t  )  with their co-efficients f  !  g  . The cumulative form has several advantages overother quaternion curve representations:

1. It has a simple closed form equation, which simplifies the

evaluation of curve points and reduces the numerical errors.

2. It facilitates straight-forwardcomputations of highorder deriva-tives.

3. Using C 

k  -continuous basis functions f    g  , we can easily

construct C 

k  -continuous quaternion curves,which are furthercontrolled by the coefficients

f  !  g 

.

4. A well-chosen set of basis functions makes the constructedquaternion curves locally controllable.

5. Since k  exp(  !  )  k  =  1, the quaternion curves are in S 

3.

Page 4: Qua Tern Ion Curves

8/8/2019 Qua Tern Ion Curves

http://slidepdf.com/reader/full/qua-tern-ion-curves 4/8

4.2 Cumulative Basis

In the Euclidean space R 

3, there are many well-known spline curveconstruction schemes such as Bezier and B-spline curves. Mostof the spline curves are represented as the sums of basis functionswith their control points as the coefficients. Let f  B  g  be the basisfunctions and f  p  g  be the control points. Then, the spline curvep  (  t  )  , determined by f  p  g  , is given by:

p  (  t  ) = 

X  

=  0

p  B  (  t  ) 

which is called the basis form of p  (  t  )  . We present a general schemethat convertsthe basisformto the cumulative form of the quaternioncurve. Using this method, we can easily construct various unitquaternion curves from their analogues in the Euclidean space R 

3.The basis form can be first converted into the following form:

p  (  t  ) =  p  0e 

B  0 (  t  ) + 

X  

=  1

∆p 

B  (  t  ) 

where∆ p  =  p  ?  p  1

B  (  t  ) = 

j  = 

B  (  t  ) 

Then, the corresponding quaternion curve is obtained as follows:

q  (  t  ) =  q 

e B  0 t  ) 

0

Y  

=  1

exp(  ! 

B  (  t  ) )  (  7) 

by converting p  (  t  )  to q  (  t  )  , p  0 to q  0, ∆ p  to !  =  log(  q 

11 q  )  ,

and vector addition to quaternion multiplication. Equation (7) isgiven in a cumulative form. One needs to be extremely careful inthe order of multiplication: q 

11 q  . If the angular velocities are

given in the global frame, the quaternion multiplication: q  q 

11

should be used, instead of  q 

11 q  . The new basis f 

B  g  is called

the cumulative basis of  f  B  g  . The cumulative form is the basictool for our quaternion curve construction in S O  (  3 )  . Simply by

deriving a cumulative basisf 

B  g 

, we caneasily obtaina quaternioncurve which shares many important differential properties with itscounterpart in the Euclidean space R 

3.

5 A NEW CLASS OF QUATERNION CURVES

5.1 Bezier Quaternion Curve

We can represent an n  -th order Bezier curve with Bernstein basis

 

(  t  ) = 

 

(  1 ?  t  ) 

t  as follows:

p  (  t  ) = 

X  

=  0

p   

(  t  )  (  8) 

wherep 

’s are the control points. For the Bezier curve given in abasisform, we canapply our quaternion curve construction method.We first reformulate Equation (8) as follows:

p  (  t  ) =  p  0˜

  0 n 

(  t  ) + 

X  

=  1

∆p 

˜ 

(  t  ) 

where the cumulative basis functions are given by:

˜ 

(  t  ) = 

X  

j  = 

 

(  t  )  (  9) 

Then, byconverting itto the cumulative form,we canobtainthen 

-thorder Bezier quaternion curve with control points f  q  g  as follows:

q  (  t  ) =  q  0

Y  

=  1

exp(  ! 

˜ 

(  t  ) )  (  10) 

where!  =  log(  q 

11 q  ) 

Note that ˜  0 n 

(  t  ) =  1. This Bezierquaternion curve has a differentshape from the Bezier quaternion curve of Shoemake [17].

5.2 Hermite Quaternion Curve

A cubic Hermite curve is defined by two end points, p 

and p 

, andtwo end velocities, v 

and v 

. Alternatively, the Hermite curve canbe represented by a cubic Bezier curve:

p  (  t  ) = 

3X  

=  0

p    (  t  )  (  11) 

with the condition:

0=  p 

1=  p 

+  v 

3p 

2=  p 

?  v 

3p 

3=  p 

12) 

where   (  t  ) =    3 (  t  )  for i  =  0 1 2 3.Similarly, a cubic Bezier quaternion curve can be usedto define

a Hermite quaternion curve which interpolates two end unit quater-nions, q 

and q 

, and two end angular velocities, ! 

and ! 

. FromEquation (10), the cubic Bezier quaternion curve is given by:

q  (  t  ) =  q  0

3Y  

=  1

exp(  ! 

˜  (  t  ) )  (  13) 

where ˜  (  t  ) = 

˜  3 (  t  )  for i  =  1 2 3. The quaternion counterpart

of Equations (12) is given by:

q  0 =  q 

q  1 =  q 

exp(  ! 

=  3 )  q  2 =  q 

exp(  ! 

=  3) 

1q  3 =  q 

Thesefour identities determine the three coefficients !  of the cubicBezier quaternion curve in Equation (13) as follows:

!  1 =  log(  q 

10 q  1 ) =  log(  q 

1a 

exp(  ! 

=  3 ) ) =  ! 

=  3

!  2 =  log(  q 

11 q  2 ) =  log(  exp(  ! 

=  3 ) 

1q 

1a 

exp(  ! 

=  3) 

1) 

!  3 =  log(  q 

12 q  3 ) =  log(  exp(  ! 

=  3)  q 

1b 

) =  ! 

=  3

Using these three angular velocities, we can construct a cubic Her-mite quaternion curve from Equation (13). Note that we can assignarbitrarily large angular velocities at the curve end points. Theangular velocity !  2 provides an extra degree of freedom in choos-ing the number n  of revolutions while not losing the end pointinterpolation property. That is, instead of 

!  2, we may use

!  2 + 

b !  2 n  

for an integern

where b !  2 =  !  2 =  k  !  2 k  . The curve shape changes,depending on thenumber of revolutions. (Note that the angular velocity is measuredhere in S 

3; therefore, the magnitude is half the rotation in thephysical space.) Figure 2 shows the graphs of basis functions ˜

  ’s.Figure 3 shows Hermite quaternion curves with the same controlpoints, but with different angular velocities ! 

’s. Since it is difficultto visualize the quaternion curves in S 

3, they are projected onto aunit sphere in R 

3.Now, we will show that the cubic Hermite quaternion curve

interpolates the two orientations, q 

and q 

, and the two angular

Page 5: Qua Tern Ion Curves

8/8/2019 Qua Tern Ion Curves

http://slidepdf.com/reader/full/qua-tern-ion-curves 5/8

0 2 

0 4 

0 6 

0 8 

0 0 . 2 0 . 4 0 . 6 0 . 8 1  

 

(  t  ) 

 

(  t  ) 

 

(  t  ) 

Figure 2: Graphs of  ˜  .

qa

qb

Figure 3: Examples of Hermite Quaternion Curves.

velocities, ! 

and ! 

, at the curve end points. It is easy to showthat:

q  (  0) =  q  0 exp(  0 )  exp(  0 )  exp(  0) 

=  q  0 =  q 

q  (  1) =  q  0 exp(  !  1 )  exp(  !  2 )  exp(  !  3 ) 

=  q  0 (  q 

10 q  1 ) (  q 

11 q  2 ) (  q 

12 q  3 ) 

=  q 

3=  q 

The first derivative of  q  (  t  )  is given by:

q  (  t  ) =  q  0 exp(  !  1˜

  1 (  t  ) ) (  !  1˙

  1 (  t  ) )  exp(  !  2˜

  2 (  t  ) )  exp(  !  3˜

  3 (  t  ) ) 

+  q  0 exp(  !  1˜

  1 (  t  ) )  exp(  !  2˜

  2 (  t  ) ) (  !  2˙

  2 (  t  ) )  exp(  !  3˜

  3 (  t  ) ) 

+  q  0 exp(  !  1

˜  1 (  t  ) ) 

exp(  !  2

˜  2 (  t  ) ) 

exp(  !  3

˜  3 (  t  ) ) (  !  3

˙  3 (  t  ) ) 

where

˜  1 (  t  ) = 

1?  ( 

1?  t  ) 

3 ˜  2 (  t  ) = 

3t 

2? 

2t 

3 ˜  3 (  t  ) =  t 

3

˙  1 (  t  ) = 

3( 

1?  t  ) 

2 ˙  2 (  t  ) = 

6t  ( 

1?  t  ) 

˙  3 (  t  ) = 

3t 

2

Thus, we have:

q  (  0) =  q  0 exp(  0 ) (  !  13 )  exp(  0)  exp(  0) 

+  q  0 exp(  !  1

˜  1 (  t  ) ) 

exp( 

0) (  !  20

exp(  !  3

˜  3 (  t  ) ) 

+  q  0 exp(  !  1 ˜  1 (  t  ) )  exp(  !  2 ˜  2 (  t  ) )  exp(  0) (  !  30 ) 

=  q  0 ! 

=  q 

q  ( 

1) =  q  0 exp

(  !  1 ) (  !  10) 

exp(  !  2 ) 

exp(  !  3 ) 

+  q  0 exp(  !  1 )  exp(  !  2 ) (  !  20)  exp(  !  3 ) 

+  q  0 exp(  !  1 )  exp(  !  2 )  exp(  !  3 ) (  !  33) 

=  q  0 q 

10 q  1 q 

11 q  2 q 

12 q  3 (  3!  3 ) 

=  q  3 ! 

=  q 

which meansthat the quaternion curve q  (  t  )  has its angularvelocities

=  q 

1a 

q  (  0 ) =  q  (  0 ) 

1q  (  0 )  and ! 

=  q 

1b 

q  (  1 ) =  q  (  1 ) 

1q  (  1) 

at the curve end points.

5.3 B-spline Quaternion Curve

The B-spline curve is very popular in computer graphics becauseof its extreme smoothness and local controllability. By moving acontrol point, we can selectively modify the B-spline curve withoutlosing its geometric continuity. In this section, we consider howto convert a B-spline curve in R 

3 into its quaternion analogue witha cumulative form. Then, we investigate the properties such asC 

k  -continuity and local controllability.A B-spline curve is defined by a weighted sum of B-spline

basis functions B 

(  t  )  , which are C 

k  2-continuous (  k  ?  1 )  -thorder piecewise polynomials. Given a set of control points f  p  g  , aB-spline curve p  (  t  )  is given by:

p  (  t  ) = 

X  

=  0

p  B 

(  t  ) 

The B-spline basis functions B 

(  t  )  are defined by the followingrecurrence relation [4]:

B  1 (  t  ) = 

 

1 if  t  < t < t  

+  1

0 otherwise

and

(  t  ) = 

t  ?  t 

+  k  1 ?  t 

k  1 (  t  ) + 

+  k 

?  t 

+  k 

?  t 

+  1

+  1 k  1 (  t  ) 

It is easy to show thatB 

’s areC 

k  2-continuous piecewise poly-

nomials of degree ( k  ?  1). They are C 

k  2-continuous every-where, and may not be C 

k  1-continuous only at the knots f  t  g  .Each

(  t  ) 

has a non-zero support on the interval  t  t 

+  k 

, i.e.,B 

(  t  ) =  0 for t < t  or t > t 

+  k 

.The B-spline curve may be reformulated in the following cu-

mulative form:

p  (  t  ) =  p  0e 

B  0 k 

(  t  ) + 

X  

=  1

∆ p 

(  t  ) 

where

∆ p  =  p  ?  p  1

and

(  t  ) = 

j  = 

j k 

(  t  ) 

+  k 

j  = 

j k 

(  t  )  if  t  < t < t  

+  k  1

1 if  t    t 

+  k  1

0 if t    t 

By converting p  (  t  )  to q  (  t  )  , p  0 to q  0, ∆ p  to !  , and summationto quaternion multiplication, the corresponding quaternion curve isobtained in a cumulative form as follows:

q  (  t  ) =  q 

e B  0 k 

t  ) 

0

Y  

=  1

exp(  ! 

(  t  ) ) 

where !  =  log(  q 

11 q  )  . This gives our B-spline quaternion curve,

which is C 

k  2-continuous and locally controllable with the controlpoints f  q  g  and the angular velocities f  !  g  . The B-spline quater-nion curve also allows arbitrarily large angular velocities betweentwo consecutive control points f  q  g  . Figures 4 and 5 show the

graphs of basis functions B  4 (  t  )  and e 

B  4 (  t  )  , respectively. Note

that e 

(  t  )  is non-constant only in the interval   t  t 

+  k  1 , whereasB 

(  t  )  is non-constantin   t  t 

+  k 

. Figure 6 showsexamplesof B-spline quaternion curves. The local shape controllability is shownwith dashed curves.

Page 6: Qua Tern Ion Curves

8/8/2019 Qua Tern Ion Curves

http://slidepdf.com/reader/full/qua-tern-ion-curves 6/8

0 1 

0 2 

0 3 

0 4 

0 5 

0 6 

0 7 

0 1 2 3 4 5 6  

0  4 

(  t  ) 

1  4 

(  t  ) 

2  4 

(  t  ) 

Figure 4: B-spline Basis Functions.

0 2 

0 4 

0 6 

0 8 

1 2 

0 1 2 3 4 5 6  

0  4 

(  t  ) 

1  4 

(  t  ) 

2  4 

(  t  ) 

Figure 5: Cumulative B-spline Basis Functions.

Now, we can investigate some interesting differential and ge-ometric properties of the B-spline quaternion curve: i.e.,

k  -

continuity and local controllability. It is easy to show that e 

(  t  ) 

is C 

k  2-continuous since it is a weighted sum of  C 

k  2-continuousfunctions f  B 

g  . Therefore, the k  -th order B-spline quaternion

curve is C 

k  2-continuous as well. Since the cumulative basis func-tion e 

(  t  )  is non-constant in the interval   t  t 

+  k  1 , the quater-

nion curve q  (  t  )  on the interval t    t < t 

+  1 can be representedby:

q  (  t  ) =  q  0

 

k  +  1

=  1exp(  !  1 ) 

 

=  k  +  2exp(  ! 

(  t  ) ) 

 

=  +  1exp(  !  0) 

 

=  q 

k  +  1

=  k  +  2exp

(  ! 

(  t  ) ) 

This equation shows that the quaternion curve q  (  t  )  depends onlyon the quantities: q 

k  +  1, ! 

k  +  1, !  , that is, only on the k 

control points:q 

k  +  1 q 

. In other words, bymoving thecontrol point q  , the curve shape is influenced only on the interval  t  t 

+  k 

.Furthermore, the derivation of 

q  (  t  ) 

is extremely simple due tothe B-spline differentiation formula [4]:

d t 

X  

  B 

(  t  ) = 

X  

(  k  ?  1 ) 

  ?    1

+  k  1 ?  t 

k  1 (  t  ) 

where   ’s are constants. Therefore, we have:

(  t  ) = 

k  1t 

i  +  k  1 t 

k  1 (  t  ) 

In the case of a uniform B-spline, there is a further reduction to:e 

(  t  ) =  B 

k  1 (  t  )  .

q1

q2

q4

q5

q6 

q3

Figure 6: B-spline Quaternion Curve with Six Control Points.

6 EXPERIMENTAL RESULTS

6.1 Torque Computation

The spline interpolation inR 

3 produces a pathp 

which minimizesthe energy:

Z  

k  ¨p  k  2 d t

while satisfying given constraints. Thus, the spline interpolationpath does not generate unnecessary force (or acceleration). Theenergy minimization property makes the spline interpolation veryuseful. As far as rotational motion is concerned, it is important tominimize torque (or angular acceleration). Most of the previousresults on quaternion interpolation have concentratedon improvingthe computational efficiency rather than attacking the more chal-lenging problem of energy minimization.

Barr et al. [1] took an important step toward the energy min-imization. The quaternion path is approximated by discrete unitquaternions and a time-consuming non-linear optimization is em-ployed in the algorithm. There still remainsan important open prob-lem concerning howto construct an energy minimization quaternion

path, ideally with a closed form equation and without using a time-consumingoptimization technique. In this paper, we have provideda useful step toward the resolution of this problem by introducing anew class of spline quaternion curves for which high order deriva-tives can be obtained in simple closed form equations. Althoughthe problem of how to deal with these closed form equations is stillunsolved, our quaternion curves exhibit promising behaviors bygenerating relatively small torque compared with those generatedby the previous methods.

Our cubic quaternion curves generatea similar amount of torque(in therange of   5%) tothatof Shoemake [17] when the controlunitquaternions have small angular variations. However, our curvesperform much better when the variations are large. The meth-ods based on recursive slerp constructions may generate twistedcurves when the spherical control polygon on

3 has edges of rel-

atively large lengths. This effect can be explained as follows. Theslerp-based methods generate a sequenceof intermediate quaternioncurves q 

(  t  )  ’s, and blend each pair of two consecutive curvesq 

(  t  )  and q 

+  1 k 

(  t  )  to generate another sequence of quaternioncurves

k  +  1 (  t  ) 

’s:

k  +  1 (  t  ) =  q 

(  t  ) 

exp(  f  (  t  ) 

log(  q 

(  t  ) 

1q 

+  1 k 

(  t  ) ) ) 

for some blending functionf  (  t  ) 

. When the variations of con-trol quaternions are large, the two quaternion curves q 

(  t  )  andq 

+  1 k 

(  t  )  have large curve lengths. They may have complex wind-

ing shapesin thecompact space S 

3. The difference quaternion curve

Page 7: Qua Tern Ion Curves

8/8/2019 Qua Tern Ion Curves

http://slidepdf.com/reader/full/qua-tern-ion-curves 7/8

(  t  ) 

1q 

+  1 k 

(  t  ) 

would also wind many times. However, the

measure, log (  q 

(  t  ) 

1q 

+  1 k 

(  t  ) )  , is always bounded by   , whichtotally ignores the large amount of winding. As a result, the blend-ingcurve

k  +  1 (  t  ) 

experiences large bending,which produces largetorque. As the intermediate curves with bending shapesare blendedrecursively, the resulting quaternion curve has a twisting shape.

Our quaternion curves do not suffer from such a degener-acy. This is because our primitive quaternion curve q  (  t  ) = 

exp(  !    (  t  ) )  may accommodate arbitrarily large angular velocity! 

. The resulting curve has a large number of winding; however,the curve does not produce extraordinary bending and/or twisting.Therefore, our curves perform much better when the angular varia-tions are large. Furthermore, our curves have C 

2-continuity, whichmeansthat there is no torque jump at the curve joint. The piecewisecubic quaternion curves (based on the de Casteljau type construc-tion) are not C 

2-continuous; they have torque jump at each curve joint. High degree rational spherical curves have C 

2-continuity[19]; however, their speeds are less uniform than the curves basedon the de Casteljau typeconstruction. Therefore, the rational curvesgenerate redundant tangential accelerations, which has undesirableeffect.

6.2 Animation Examples

We present some examples to demonstrate the feasibility of ourquaternion curves. Figure 7 shows an animation of a flying boomerang.In this example, the motion path is composed of a Hermite curvefor the translation and a Hermite quaternion curve for the rotation.Using the Hermite quaternion curve, we can specify arbitrary ori-entations and angular velocities of the boomerang at the start andend of the animated motion. Note that the boomerang experiencesmanyrevolutions. This effect is obtainedby assigninglarge angularvelocities at both ends.

Ourcubic B-spline quaternion curve produces extremely smoothmotions. Figure 8 shows a motion path, which is specified by aB-spline curve with six control points. A rigid motion path canbe used to specify the sweeping of a 2D cross section. Figure 9shows a sweep object generated from the same motion path givenin Figure 8. Figure 10 shows an example of B-spline quaternioninterpolation for a rigid body, where the position and orientationinterpolation curves are constructed by the B-spline interpolationcurves in R 

3 and S O  (  3 )  , respectively. Six keyframes are used inthis example, and they are shown in dark tints.

7 CONCLUSIONS

A general construction method is proposed for unit quaternioncurves. Given a spline curvein R 

3, the spline curve is reformulatedin a cumulative basis form and the corresponding quaternion curveis constructed by converting each vector addition into the quater-nion multiplication. The quaternion curve is formulated as a finiteproduct of simple quaternion curves, which makes the evaluationof high order derivatives quite straightforward. The constructedquaternion curves preserve many important differential properties

of their counterparts inR 

3

. Furthermore, the quaternion curvesand their high order derivatives are given by simple closed formequations.

Experimental results are quite promising in that our quaternioncurves use small torque compared with the previous quaternioncurves, especially when the control quaternions have large varia-tions. Although the important torque minimization problem hasnot been solved in this paper, our approach provides an importantinitial step toward this goal.

Figure 7: Boomerang Animation using one Hermite QuaternionCurve.

Figure 8: Rigid Motion by a Cubic B-spline Quaternion Curve.

Figure 9: Sweeping with Cubic B-spline Quaternion Curves.

Figure 10: Example of B-spline Quaternion Interpolation.

Page 8: Qua Tern Ion Curves

8/8/2019 Qua Tern Ion Curves

http://slidepdf.com/reader/full/qua-tern-ion-curves 8/8

REFERENCES

[1] BARR, A., CURRIN, B., GABRIEL, S., AND HUGHES, J. Smoothinterpolation of orientations with angular velocity constraintsusing quaternions. Computer Graphics (Proc. of SIGGRAPH ’92) (1992), pp. 313–320.

[2] BARRY, P., AND GOLDMANN, R. A recursive evaluation algo-rithm for a classof Catmull-Rom splines. Computer Graphics(Proc. of SIGGRAPH ’88) (1988), pp. 199–204.

[3] CURTIS, M. Matrix Groups, Springer-Verlag, 1972.

[4] DE BOOR, C. A Practical Guide to Splines, Springer-Verlag,1978.

[5] HAMILTON, W. Elements of Quaternions (Volume I, II),Chelsea Publishing Company, 1969.

[6] JUNKINS, J., AND TURNER, J. Optimal continuous torqueattitude maneuvers. J. Guidance and Control 3, 3 (1980),pp. 210–217.

[7] JUNKINS, J., AND TURNER, J. Optimal Spacecraft Rotational Maneuvers, Elsevier, 1986.

[8] JUTTLER, B. Visualization of moving objects using dualquaternion curves. Computers & Graphics 18, 3 (1994),pp. 315–326.

[9] KIM, M.-J., KIM, M.-S., AND SHIN, S. A compact differentialformula for the first derivative of a unit quaternion curve. Toappear in J. of Visualization and Computer Animation (1995).

[10] KIM, M.-J., KIM, M.-S., AND SHIN, S. AC 

2-continuous B-spline quaternion curve interpolating a given sequenceof solidorientations. Proc.of ComputerAnimation’95 (1995), pp. 72–81.

[11] KIM, M.-S., AND NAM, K.-W. Interpolating solid orienta-tions with circular blending quaternion curves. To appear inComputer-Aided Design (1995).

[12] NIELSON, G. Smooth interpolation of orientation. Modelsand Techniques in Computer Animation (Proc. of Computer 

  Animation ’93) (1993), N. Thalmann and D. T. (Eds.), Eds.,Springer-Verlag, pp. 75–93.

[13] NIELSON, G., AND HEILAND, R. Animated rotationsusing quaternions and splines on a 4D sphere. Pro-grammirovanie(Russia)(July-August 1992), Springer-Verlag,pp. 17–27. English edition, Programmingand Computer Soft-ware, Plenum Pub., New York.

[14] PLETINCKS, D. Quaternion calculusas a basictoolin computergraphics. The Visual Computer 5, 1 (1989), pp. 2–13.

[15] POBEGAILO, A. Modeling of C 

n  spherical and orientationsplines. To appear in Proc. of Pacific Graphics ’95 (1995).

[16] SCHLAG, J. Using geometric constructions to interpolate orien-tation with quaternions. Graphics GEMS II , Academic Press,1992, pp. 377–380.

[17] SHOEMAKE, K. Animating rotation with quaternion curves.

Computer Graphics (Proc. of SIGGRAPH ’85) (1985),pp. 245–254.

[18] SHOEMAKE, K. Quaternion calculus for animation. Math for SIGGRAPH (ACM SIGGRAPH ’91 Course Notes #2) (1991).

[19] WANG, W. Rational spherical curves. Presented atInt’l. Conf. on CAGD, Penang, Malaysia (July 4-8, 1994).

[20] WANG, W., AND JOE, B. Orientation interpolation in quater-nion space using spherical biarcs. Proc.of Graphics Interface’93 (1993), pp. 24–32.

APPENDIX

In this appendix, we provide the pseudo codes for the constructionof quaternion curves presented in Section 5.

Bezier Quaternion Curve

 //  q  0 ; : : : ; q  

: control points

double˜

 

(  t  ) = 

j  = 

 

1?  t  ) 

quaternion Bezier(  q  0 q  1 ; : : : q  

) (  t  ) 

return (q  0

=  1exp(  log(  q 

11 q  ) 

˜ 

(  t  ) ) )  ;end

Hermite Quaternion Curve

 // q 

: the start and end orientations //  ! 

: the start and end angular velocities

double ˜  1 (  t  ) = 

1?  ( 

1?  t  ) 

3, ˜  2 (  t  ) = 

3t 

2? 

2t 

3, ˜  3 (  t  ) =  t 

3

quaternion Hermite (  q 

) (  t  ) 

q  0 =  q 

;!  1 =  ! 

=  3;

!  2 =  log(  exp(  !  1 )  1 q  1a 

b  exp(  !  3 ) )  ;!  3 =  ! 

=  3;

return (q  0 exp(  !  1˜

  1 (  t  ) )  exp(  !  2˜

  2 (  t  ) )  exp(  !  3˜

  3 (  t  ) )  );end

B-spline Quaternion Curve

 //  t  : knot sequence

doubleB 

(  t  ) 

= B-spline basis of orderk 

double e 

(  t  ) = 

+  k 

j  = 

j k 

(  t  ) 

quaternion B-spline (  q  0 q  1 ; : : : q  

) (  t  ) 

l  =  maxf  i  t 

+  k  1   t  g  ;

if (l <  0) then

f  l  =  0; q  =  q 

e B 

0 k 

t  ) 

0 g 

elseq  =  q  ;

for (i  =  l  +  1; i    n  && t  < t  ; i  ++)

q  =  q  exp(  log(  q 

11 q  ) 

(  t  ) )  ;

return (q  );end

Uniform B-spline Quaternion Curve

 //  t  =  i  ?  2: uniform knots // 0   t    n 

 // uniform-B-spline( 

0) =  q  0

 // uniform-B-spline (  n  ) =  q 

 // uniform-B-spline(  i  )    q 

quaternion uniform-B-spline (  q  0 q  1 ; : : : q  

) (  t  ) 

q  1 =  q  0 q 

11 q  0; //phantom

n  +  1 =  q 

1n  1 q 

;// control points

l  =  b  t  ?  1 c  ;q  =  q  ;for (

i  =  l  + 

1;i < t  + 

2;i 

++)

q  =  q  exp(  log(  q 

11 q  ) 

(  t  ) )  ;return (q  );

end