logo back up home forward   further reading more topics »

Maths - Quaternion Notations - Vector Division

I'm not sure that this is a very practical or useful way to define quaternions? However in might be interesting to investigate.

p2=q * p1 * conj(q)

Why can't we have a simple transform, similar to matrix transforms, where a point is transformed just by multiplying by the quaternion:

p2=q * p1

where:

This almost works, but not quite, so it might be instructive to try and work out the reasons.

If we rearrange the equation we get:

q = p1 / p2

The division of two vectors does not have a solution, as explained here, by the usual types of multiplication used with vectors (cross multiplication). However, using quaternions, we can define a way to do this division.

We can define a vector using quaternions by setting the real part to zero, and the imaginary pars to the vector coordinates:

p1 = 0 + a i + b j + c k

p2 = 0 + e i + f j + g k

Dividing these vectors gives:

q = (a*e + b*f +c*g) + (g*b - f*c) i + (e*c - a*g) j + (f*a - e*b) k

So we get a quaternion where the real part is the dot product and the complex parts are the cross product of the vectors.

This quaternion can be used to represent the rotation of one vector to another, see angle between vectors.

Can this quaternion, used in this way, be combined and used to represent subsequent rotations? It turns out that this will only work if the axies of both rotations are aligned. So this can't be used to concatenate general rotations, to do that we must use:

p2=q * p1 * conj(q)

where q is defined in terms of angle/2 in the normal way.

It seems like we have to do half the rotation by pre-multiplying by q and then the other half of the rotation by post-multiplying by conj(q). Its almost like doing the rotation in two parts like this cancels out the errors?

Is this true?

I can't think how to carry this argument further. Any ideas?


metadata block
see also:

 

Correspondence about this page

Book Shop - Further reading.

Where I can, I have put links to Amazon for books that are relevant to the subject, click on the appropriate country flag to get more details of the book or to buy it from them.

 

cover us uk de jp fr ca Quaternions and Rotation Sequences.

Commercial Software Shop

Where I can, I have put links to Amazon for commercial software, not directly related to the software project, but related to the subject being discussed, click on the appropriate country flag to get more details of the software or to buy it from them.

 

cover Dark Basic Professional Edition - It is better to get this professional edition

cover This is a version of basic designed for building games, for example to rotate a cube you might do the following:
make object cube 1,100
for x=1 to 360
rotate object 1,x,x,0
next x

cover Game Programming with Darkbasic - book for above software

Can you help?

Please send me any improvements to here. I would appreciate ideas to make the pages more useful including error correction, ideas for new pages, improvements to wording. It helps if you quote the full URL of the page.

 

Terminology and Notation

Specific to this page here:

 

program

I am working on a project which uses these principles, if you would like to help me with this you are welcome to join in, here:

http://sourceforge.net/projects/mjbworld/

This site may have errors. Don't use for critical systems.

Copyright (c) 1998-2008 Martin John Baker - All rights reserved.