Still need some help with Quaternions!

Still need some help with Quaternions!

Post by Jim Willia » Tue, 05 Aug 1997 04:00:00



I've been asking questions about quaternions over the last couple of
days, and I've got a lot of useful answers, (thank you to those people
who responded)

 BUT!
 I'm still not sure how to solve the following problem:

If I have a unit quaternion Q, defined which gives me an
orientation of an object. I have a unit axis of rotation vector  R,
that  I  wish to rotate the object around,  (by a given angle  A).
What is the Quaternion, Qnew, giving the final, rotated position of
the object?

I thought it might be

Qnew = BQB'

Where B = (cos(A/2), sin(A/2)R),  and
B' is the inverse of B = (cos(A/2),- sin(A/2)R)

And where the Quaternion multiply operates as follows:
AB =(AsBs -Av.Bv , AsBv+BsAv+AvxBv)

But I tried this, and It didn't seem to give sensible results.

What am I doing wrong?!
Thanks for any help,
Jim Williams

 
 
 

Still need some help with Quaternions!

Post by Ferdi Smi » Fri, 08 Aug 1997 04:00:00


oops, forgot to say this, when the quaternion is unit it's conjugate IS
it's inverse. So you were right after all, but just taking it's
conjugate is faster then calculating *q/q* . q
cheers,

Ferdi (MAD) Smit

 
 
 

1. Need help with Quaternions!

I have some questions about quaternions.

I've seen lots of references to them, but have yet to see a clear
explaination of how they work.

I know that a quaternion is an method of storing a 3d orientation,
a superior (as it's smaller, and faster to compute) alternative
to a Euler matrix.

I know that a quaternion  some how represents a direction vector, and
the rotation around that vector.

I know that a quaternion Q is defined as Q = r,(vx,vy,vz), where r is
a scalar, and (vx,vt,vz) is a vector, but I'm not sure how this
relates to the description immediately above.

I've some "black box" code to convert Euler Matrices to Quaternions,
and
vice versa, but it's been of little assistance!

An application where I'd like to use quaternions is as follows:
I have a cuboid object, with associated orientation quaternion, which
I'm
trying to rest on a plane.I have the  plane normal. The object is not
quite
flat on the plane plane. It seems to me, that I could use the plane
normal
as the direction part of the quaternion, to align the object in the
plane normal axis, and retain the angle information of the quaternion,
so that the orientation in the other 2 axes perpendicular to the plane
normal is not lost.
(I hope this makes sense!)
Does this seem like a good appropriate way to use quaternions?

I'd greatly appreciate any help with any of these questions, or
pointers
to on-line places to look.

Thanks

Jim Williams

2. Low cost Video cards

3. Need help with Quaternions

4. gluOrtho2D

5. Need help with quaternion rotation

6. News about 3D software for NeXTSTEP

7. need help with quaternions

8. Need help with Quaternions!

9. Still need some help with Quaternions!

10. ##HELP! Quaternion formula needed

11. Q: Need app converting time-lapse stills into movies

12. Help with stills from Canon GL-1