Documentation for /home/davin/idl/socware/

Generated by IDLdoc

single page | use frames     summary     class     fields     routine details     file attributes

general/misc/quaternion/

qslerp.pro


Function: qslerp,q,x1,x2 Purpose: uses spherical linear interpolation to interpolate quaternions between elements of q Inputs: q: an Nx4 element array, representing a list of quaternions with N > 1, all quaternions must be unit quaternions(ie length/norm = 1) x1: The input abscissa values of the quaternions,an array of length N, abscissa values must also be monotonic x2: The output abscissa values for the quaternions, can have as many elements as wanted but must fall on the interval [x[0],x[N-1]], an M element array, abscissa values must also be monotonic geometric(optional): this keyword allows you to specify that it use the geometric formula for the slerp. The default formula is probably faster and more numerically stable, the geometric option is just available for testing Testing of the geometric method indicates that the norm of the interpolated quaternions strays easily from unit length, when it renormalizes results may be destabilized Returns: an Mx4 element array of interpolated quaternions or -1L on failure ;Notes: Represention has q[0] = scalar component q[1] = vector x q[2] = vector y q[3] = vector z The vector component of the quaternion can also be thought of as an eigenvalue of the rotation the quaterion performs The scalar component can be thought of as the amount of rotation that the quaternion performs While the code may seem a little esoteric, it is vectorized and provides the most accurate results it can get Written by: Patrick Cruce(pcruce@igpp.ucla.edu) $LastChangedBy: egrimes $ $LastChangedDate: 2014-03-03 09:16:32 -0800 (Mon, 03 Mar 2014) $ $LastChangedRevision: 14474 $ $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/general/misc/quaternion/qslerp.pro $

Routines

top source qslerp

result = qslerp(q, x1, x2, geometric=geometric)

Parameters

q
x1
x2

Keywords

geometric

File attributes

Modification date: Thu Mar 13 16:35:40 2014
Lines: 96