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: Bob Odom
Subject: Re: find the rotation matrix between two vectors
Date: Tue, 27 Apr 2010 10:16:17 -0700 (PDT)

Octave-Forge has a quaternion package, but I haven't used it.

http://octave.sourceforge.net/quaternion/index.html


On Tue, 27 Apr 2010, James Sherman Jr. wrote:

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<http://en.wikipedia.org/wiki/Axis_angle>or
here<http://www.euclideanspace.com/maths/geometry/rotations/conversions/angleToQuaternion/index.htm>
.

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"<http://www.google.com/#hl=en&source=hp&q=quaternion+for+matlab&aq=f&aqi=&aql=&oq=&gs_rfai=&fp=4f910945c1ee36d4>

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]