Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Graphics > OpenGL 3D API > Re: help with q...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 3 Topic 4841 of 5017
Post > Topic >>

Re: help with quaternions

by Ken <ken@[EMAIL PROTECTED] > Jul 22, 2008 at 05:01 PM

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.
 




 3 Posts in Topic:
help with quaternions
ms <madhuri.sethi@[EMA  2008-07-17 10:14:40 
Re: help with quaternions
singin_dav <sone@[EMAI  2008-07-18 08:34:27 
Re: help with quaternions
Ken <ken@[EMAIL PROTEC  2008-07-22 17:01:33 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Nov 21 5:38:35 CST 2008.