Version: 0.9 Date: 2002-11-07 This .zip file contains 13 very basic functions for symbolic manipulation of quaternions. I hope to add a better version before the year ends. All the following functions accept algebraic and symbolic arguments, for example, you can define a quaternion as 7-g*i+(x^2-3)j+k. Characters i, j and k are reserved because they represent the imaginary units of the system. + cmx2cuat: Receives two arguments. The first one is a complex number and the second one, an imaginary vector written algebraically, and returns a quaternion with the same modulus and real part of the complex number in the direction of the vector. Example: cmx2cuat(2+6ï,i+2j+k) Note: I use the "ï" to represent the imaginary unit symbol that TIs use, in contrast to the ordinary letter "i". + cuat2cmx: Receives a quaternion, and returns the complex mudulus of the cuaternion, as a complex number. Example: cuat2cmx(3-4i+2j+8k) + cuat2vec: Converts a quaternion into a 4-vector. Example: cuat2cmx(-3-4j+k) + qabs: Obtains the absolute value of a quaternion. Example: qabs(-3-4j+k) + qexp: Calculates the function e^Q for a received cuaternion Q. Example: qexp(3+j-k) + qimag: Obtains the imaginary part of a cuaterion, in its full 3D form. Example: qexp(a+j*b-8k) + qimagm: Same than above, but the answer is the magnitude of the imaginary part. + qimagu: Returns an imaginary unit in the same direction that the imaginary part of the input quaternion. + qreal: Returns the real part of a quaternion. + qprod: Returns the full Grassman product of two received quaternions. Example: qprod(i+j,3-j+k) + qinv: Returns Q^-1 for an input quaternion Q. + qrot: Returns the Rotational function of the first argument around the second. This function does not allow scalling. Note: The function expects two receive two quaternions, where the second one has to be purely imaginary. If it's not the case, the real part will be made 0. + vec2cuat: Receives a 4D vector and returns the dot product with [1,i,j,k]. I'd really appreciate any comments or suggestions. Ricardo A. Espinoza Reyes ricardo_arturo@gmx.net