On Jul 17, 11:14=A0am, ms <madhuri.se...@[EMAIL PROTECTED]
> wrote:
> I'm trying to do the following:
> I have 2 frames, F1, F2, represented by matrices.
> I need to align the Z axis of F1 to the Z axis of F2. I'm hoping to do
> this using Quaternions, but I'm not clear
> on the geometric interpretation of quaternion multiplication.
>
> This is what I have:
> 1) get the angle b/n the 2 Z axes, and a normal vector to both
> 2) construct a quat from this angle/normal vector (Qmove)
> 3) construct a quat from =A0F1 (Q1)
> 4) set F1 =3D quat_to_matrix( Qmove*Q1)
>
> I don't get the result I need.
>
> Thanks for your help.
I'm not certain if I understand exactly. However for the given
problem why not create a transformation to translate F1 to F2 or vice
versa, in this way all axes are aligned? Then just take the
information you want. Quaternions provide the same basic features as
rotation matrices and are more easily understood, once the issue has
been solved with rotation matrices I recommend later implementing with
quaternions. That is only if you are concatenating many matrices, as
quaternion concatenation is much faster (and more stable too)...
Anyways if you want to translate F1 to F2, take the inverse of F1 and
multiply it to F2, to produce T the transform matrix. I suppose the
inverse of T goes from F2 to F1. It's been a while since I took
linear algebra. Anyways the point being find the transformation to
transform F1 back to standard position and then apply F2 to it and
your problem will probably become simpler.
I was about to fire this off and it occurred to me, maybe just maybe
you wanted this transformation to be gradual and that is one of the
other strengths of quaternions they are great for spherical
interpolation.


|