# Rational motion

In kinematics, the motion of a rigid body is defined as a continuous set of displacements. One-parameter motions can be defined as a continuous displacement of moving object with respect to a fixed frame in Euclidean three-space (E$^3$), where the displacement depends on one parameter, mostly identified as time.
Rational motions are defined by rational functions (ratio of two polynomial functions) of time. They produce rational trajectories, and therefore they integrate well with the existing NURBS (Non-Uniform Rational B-Spline) based industry standard CAD/CAM systems. They are readily amenable to the applications of existing computer-aided geometric design (CAGD) algorithms. By combining kinematics of rigid body motions with NURBS geometry of curves and surfaces, methods have been developed for computer-aided design of rational motions.
These CAD methods for motion design find applications in animation in computer graphics (key frame interpolation), trajectory planning in robotics (taught-position interpolation), spatial navigation in virtual reality, computer-aided geometric design of motion via interactive interpolation, CNC tool path planning, and task specification in mechanism synthesis.

## Background

There has been a great deal of research in applying the principles of computer-aided geometric design (CAGD) to the problem of computer-aided motion design. In recent years, it has been well established that rational Bézier and rational B-spline based curve representation schemes can be combined with dual quaternion representation of spatial displacements to obtain rational Bézier and B-spline motions. Ge and Ravani, developed a new framework for geometric constructions of spatial motions by combining the concepts from kinematics and CAGD. Their work was built upon the seminal paper of Shoemake, in which he used the concept of a quaternion for rotation interpolation. A detailed list of references on this topic can be found in and.

## Rational Bézier and B-spline motions

Let ${\hat {\textbf {q}}}={\textbf {q}}+\varepsilon {\textbf {q}}^{0}$ denote a unit dual quaternion. A homogeneous dual quaternion may be written as a pair of quaternions, ${\hat {\textbf {Q}}}={\textbf {Q}}+\varepsilon {\textbf {Q}}^{0}$; where ${\textbf {Q}}=w{\textbf {q}},{\textbf {Q}}^{0}=w{\textbf {q}}^{0}+w^{0}{\textbf {q}}$. This is obtained by expanding ${\hat {\textbf {Q}}}={\hat {w}}{\hat {\textbf {q}}}$ using dual number algebra (here, ${\hat {w}}=w+\varepsilon w^{0}$).
In terms of dual quaternions and the homogeneous coordinates of a point ${\textbf {P}}:(P_{1},P_{2},P_{3},P_{4})$ of the object, the transformation equation in terms of quaternions is given by
${\tilde {\textbf {P}}}={\textbf {Q}}{\textbf {P}}{\textbf {Q}}^{\ast }+P_{4}[({\textbf {Q}}^{0}){\textbf {Q}}^{\ast }-{\textbf {Q}}({\textbf {Q}}^{0})^{\ast }],$ where ${\textbf {Q}}^{\ast }$ and $({\textbf {Q}}^{0})^{\ast }$ are conjugates of ${\textbf {Q}}$ and ${\textbf {Q}}^{0}$, respectively and ${\tilde {\textbf {P}}}$ denotes homogeneous coordinates of the point after the displacement.
Given a set of unit dual quaternions and dual weights ${\hat {\textbf {q}}}_{i},{\hat {w}}_{i};i=0...n$ respectively, the following represents a rational Bézier curve in the space of dual quaternions.
${\hat {\textbf {Q}}}(t)=\sum \limits _{i=0}^{n}{B_{i}^{n}(t){\hat {\textbf {Q}}}_{i}}=\sum \limits _{i=0}^{n}{B_{i}^{n}(t){\hat {w}}_{i}{\hat {\textbf {q}}}_{i}}$
where $B_{i}^{n}(t)$ are the Bernstein polynomials. The Bézier dual quaternion curve given by above equation defines a rational Bézier motion of degree $2n$.
Similarly, a B-spline dual quaternion curve, which defines a NURBS motion of degree 2p, is given by,
    ${\hat {\textbf {Q}}}(t)=\sum \limits _{i=0}^{n}{N_{i,p}(t){\hat {\textbf {Q}}}_{i}}=\sum \limits _{i=0}^{n}{N_{i,p}(t){\hat {w}}_{i}{\hat {\textbf {q}}}_{i}}$
where $N_{i,p}(t)$ are the pth-degree B-spline basis functions.
A representation for the rational Bézier motion and rational B-spline motion in the Cartesian space can be obtained by substituting either of the above two preceding expressions for ${\hat {\textbf {Q}}}(t)$ in the equation for point transform. In what follows, we deal with the case of rational Bézier motion. The trajectory of a point undergoing rational Bézier motion is given by,
    ${\tilde {\textbf {P}}}^{2n}(t)=[H^{2n}(t)]{\textbf {P}},$
    $H^{2n}(t)]=\sum \limits _{k=0}^{2n}{B_{k}^{2n}(t)[H_{k}]},$
where $[H^{2n}(t)]$ is the matrix representation of the rational Bézier motion of degree $2n$ in Cartesian space. The following matrices $[H_{k}]$ (also referred to as Bézier Control Matrices) define the affine control structure of the motion:
    $[H_{k}]={\frac {1}{C_{k}^{2n}}}\sum \limits _{i+j=k}{C_{i}^{n}C_{j}^{n}w_{i}w_{j}[H_{ij}^{\ast }]},$
where $[H_{ij}^{\ast }]=[H_{i}^{+}][H_{j}^{-}]+[H_{j}^{-}][H_{i}^{0+}]-[H_{i}^{+}][H_{j}^{0-}]+(\alpha _{i}-\alpha _{j})[H_{j}^{-}][Q_{i}^{+}]$.
In the above equations, $C_{i}^{n}$ and $C_{j}^{n}$ are binomial coefficients and $\alpha _{i}=w_{i}^{0}/w_{i},\alpha _{j}=w_{j}^{0}/w_{j}$ are the weight ratios and
    $[H_{j}^{-}]=\left[{\begin{array}{rrrr}q_{j,4}&-q_{j,3}&q_{j,2}&-q_{j,1}\\q_{j,3}&q_{j,4}&-q_{j,1}&-q_{j,2}\\-q_{j,2}&q_{j,1}&q_{j,4}&-q_{j,3}\\q_{j,1}&q_{j,2}&q_{j,3}&q_{j,4}\\\end{array}}\right],$
    $[Q_{i}^{+}]=\left[{\begin{array}{rrrr}0&0&0&q_{i,1}\\0&0&0&q_{i,2}\\0&0&0&q_{i,3}\\0&0&0&q_{i,4}\\\end{array}}\right],$
    $[H_{i}^{0+}]=\left[{\begin{array}{rrrr}0&0&0&q_{i,1}^{0}\\0&0&0&q_{i,2}^{0}\\0&0&0&q_{i,3}^{0}\\0&0&0&q_{i,4}^{0}\\\end{array}}\right],$
    $[H_{j}^{0-}]=\left[{\begin{array}{rrrr}0&0&0&-q_{j,1}^{0}\\0&0&0&-q_{j,2}^{0}\\0&0&0&-q_{j,3}^{0}\\0&0&0&q_{j,4}^{0}\\\end{array}}\right],$
    $[H_{i}^{+}]=\left[{\begin{array}{rrrr}q_{i,4}&-q_{i,3}&q_{i,2}&q_{i,1}\\q_{i,3}&q_{i,4}&-q_{i,1}&q_{i,2}\\-q_{i,2}&q_{i,1}&q_{i,4}&q_{i,3}\\-q_{i,1}&-q_{i,2}&-q_{i,3}&q_{i,4}\\\end{array}}\right].$
In above matrices, $(q_{i,1},q_{i,2},q_{i,3},q_{i,4})$ are four components of the real part $({\textbf {q}}_{i})$ and $(q_{i,1}^{0},q_{i,2}^{0},q_{i,3}^{0},q_{i,4}^{0})$ are four components of the dual part$({\textbf {q}}_{i}^{0})$ of the unit dual quaternion $({\hat {\textbf {q}}}_{i})$.