DeCasteljau {qsplines}R Documentation

Spline using the De Casteljau algorithm

Description

Constructs a quaternions spline using the De Casteljau algorithm.

Usage

DeCasteljau(
  segments,
  keyTimes = NULL,
  n_intertimes,
  times,
  constantSpeed = FALSE
)

Arguments

segments

a list of vectors of unit quaternions; each segment must contain at least two quaternions

keyTimes

the times corresponding to the segment boundaries, an increasing vector of length length(segments)+1; if NULL, it is set to 1, 2, ..., length(segments)+1

n_intertimes

a positive integer used to linearly interpolate the times given in keyTimes in order that there are n_intertimes - 1 between two key times (so one gets the key times if n_intertimes = 1); this parameter must be given if constantSpeed=TRUE and if it is given when constantSpeed=FALSE, then it has precedence over times

times

the interpolating times, they must lie within the range of keyTimes; ignored if constantSpeed=TRUE or if n_intertimes is given

constantSpeed

Boolean, whether to re-parameterize the spline to have constant speed; in this case, "times" is ignored and a function is returned, with an attribute "times", the vector of new times corresponding to the key rotors

Value

A vector of quaternions whose length is the number of interpolating times.

Note

This algorithm is rather for internal purpose. It serves for example as a base for the Konachek-Bartels algorithm.


[Package qsplines version 1.0.1 Index]