MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Quaternion problem-> conversion

  • To: mathgroup at smc.vnet.net
  • Subject: [mg67458] Re: Quaternion problem-> conversion
  • From: Roger Bagula <rlbagula at sbcglobal.net>
  • Date: Mon, 26 Jun 2006 00:13:00 -0400 (EDT)
  • References: <e7ap5q$952$1@smc.vnet.net> <e7lf1d$3l9$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

I realize some people would rather use the Mathematica system
quaternions. My answer is that Matrix quaternions can be converted to 
system quaternions as long as you haven't
done something strange to them , like adding {{1,0},{0,0,}} or somthing 
else out of
symmetry.
<< Algebra`Quaternions`
i = {{0, 1}, {-1, 0}};
j = {{0, I}, {I, 0}};
k = {{I, 0}, {0, -I}};
e = IdentityMatrix[2];
q[t_, x_, y_, z_] := e*t + x*i + j*y + k*z;
q[-1/2, 1/2, 1/2, 1/2].q[-1/2, -1/2, -1/2, -1/2]
qM[a_, b_, c_, d_] :=
Quaternion[Re[q[a, b, c, d][[1, 1]]], Re[
    q[a, b, c, d][[1, 2]]], Re[q[a, b, c, d][[1, 2]]], Im[q[a, b, c, d][[1,
    1]]]]
qM[-1/2, 1/2, 1/2, 1/2] ** qM[-1/2, -1/2, -1/2, -1/2]

>
>  
>


  • Prev by Date: Re: How can I graph 3D vectors in Mathematica?
  • Next by Date: Re: NIntegrate's Method ->Oscillatory option
  • Previous by thread: Integrate the Multivariate normal distribution
  • Next by thread: Re: Integrate the Multivariate normal distribution