help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: find the rotation matrix between two vectors


From: James Sherman Jr.
Subject: Re: find the rotation matrix between two vectors
Date: Tue, 27 Apr 2010 11:12:30 -0400

The most intuitive way for me is to first axis-angle representation of the rotation, then convert it to a quaternion.

To get axis-angle is fairly straightforward, the inner product of the two vectors is the cosine of the angle, and the cross-product gives the axis (just need to normalize).

Then, to convert to quaternion, its pretty straightforward as well, but the formula is found in (of many places) Axis-angle article or here.

There is also several libraries, if you can't find any for octave specifically, written for Matlab may work with octave.  Some are GPL even, if you are concerned about that.  Search for "quaternion for matlab"

Hope this helps.

On Tue, Apr 27, 2010 at 7:18 AM, Junqian Gordon Xu <address@hidden> wrote:
I'm trying to find the rotation matrix or quaternion from two unit
vectors A and B, then to apply the rotation to a third vector C.

I played with the quaternion package on octave-forge, but the
documentation is not complete and the `demoquat` does not work well
under 3.2.4.

My knowledge of quaternion is quite limited. Does anybody have any
suggestion on how to achieve this easily in octave?

Thanks
Gordon
_______________________________________________
Help-octave mailing list
address@hidden
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave


reply via email to

[Prev in Thread] Current Thread [Next in Thread]