Documentation for /home/davin/idl/socware/

Generated by IDLdoc

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

general/misc/quaternion/

qdotp.pro


Function: qdotp,q1,q2 Purpose: calculate the dot product of two quaternions or two arrays of quaternions Inputs: q1: a 4 element array, or an Nx4 element array, representing quaternion(s) q2: a 4 element array, or an Nx4 element array, representing quaternion(s) Returns: q1.q2, or -1 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 like any vector the if t = the angle between q1 and q2 in 4-space the q1.q2 = ||q1||*||q2||*cos(t) where || denotes the norm(length) of the quaternion in 4-space Written by: Patrick Cruce(pcruce@igpp.ucla.edu) $LastChangedBy: aaflores $ $LastChangedDate: 2012-01-23 16:50:12 -0800 (Mon, 23 Jan 2012) $ $LastChangedRevision: 9593 $ $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/general/misc/quaternion/qdotp.pro $

Routines

top source qdotp

result = qdotp(q1, q2)

Parameters

q1
q2

File attributes

Modification date: Thu Feb 13 16:43:46 2014
Lines: 20