• Create Account

## Septernion multiplication

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

6 replies to this topic

### #11101  Members

100
Like
0Likes
Like

Posted 02 June 2011 - 09:58 PM

Okay so a lot of people probably know what quaternions are. A quaternion can be used to completely describe an objects orientation (how it is rotated in 3D space). This makes sense since any combination of rotations (in 3D) can be stored as a single rotation around a given axis. So what a quaternion is actually keeping track of is the x,y,z of the axis being rotated around and the amount of rotation around said axis. I like using quaternions because they are easier to work with than an equivalent 3x3 matrix. But what if I want to keep track of both an object's orientation and translation? I would need to use a 'septernion' since I would need to store seven values. Three translation values, three axis values, and one angle value. That's all simple enough but one of the things that makes quaternions so great is that given a quaternion that describes an object's rate of change in orientation and the object's current orientation you can multiply the current orientation by the rate of change in orientation to calculate the new orientation. Now the thing about quaternions it that multiplying two together isn't straight forward. For those not familiar this link here:

http://www.cprogramming.com/tutorial/3d/quaternions.html

describes how to multiply two quaternions together. However like I said what if I want to keep track of translation as well as orientation? Again I would need a vector of seven dimensions, a 'septernion'. But given that quaternion multiplication is not straight forward how would i multiply two septernions together? And further to do so in such a way that by multiplying an objects current septernion by a septernion describing it's rate of change in rotation and position calculate a new septernion describing it's location and orientation after the change has been applied?

### #2japro  Members

887
Like
2Likes
Like

Posted 03 June 2011 - 05:37 AM

Quaternions are an algebraic construct that is obtained by extending the space of complex numbers (and losing the field property in the process). You can't just define a "n-ternion" (in the sense quaterions and octonions are obtained) and expect to be able to define useful group/ring/field-structure on it. From the mathematical standpoint the use of quaternions to describe rotations is more "accidental".

That said, if you have an object's position described by a quaternion and a translation the operation to create the new configuration is obviously obtained by multiplying with the "change quaternion" and adding the translation vector (algebraically this is the direct product of the multiplicative group of the quaternions and the additive group of real 3-vectors).

Calling the configuration a septernion seems just like making up a confusing name for an obvious concept.

### #3haegarr  Members

7185
Like
0Likes
Like

Posted 03 June 2011 - 06:03 AM

... That's all simple enough but one of the things that makes quaternions so great is that given a quaternion that describes an object's rate of change in orientation and the object's current orientation you can multiply the current orientation by the rate of change in orientation to calculate the new orientation. ...

IMHO this is not really true (but I must admit to that I may misunderstand the meaning of "rate of change"): A quaternion cannot be used to express a rate of change, because this would mean a unit of "angle over time", e.g. degrees per second. Although you can implicitly attach such a unit to a quaternion, the periodicity of sine and cosine allows to store only angles from a range of 360°. As a rate of change, however, you would need to be able to store angles greater than 360° as well. Hence quaternions can be used to store orientations and "small rotations" only. Opposed to this, e.g. the axis/angle rotation representation is able to store any angle.

### #4Álvaro  Members

20235
Like
0Likes
Like

Posted 03 June 2011 - 08:43 AM

The objects your are describing are not "septernions": You are talking about the orientation-preserving isometries of the three-dimensional Euclidean space, which form a 6-dimensional Lie group. An element of this group can be described by just a quaternion and a translation, and you can define the operation of composition fairly easily (multiply the quaternions, add the translations, but you have to rotate the translation using the quaternion of the other isometry; if you are careful you'll get it right).

haegarr is right to point out that "rate of change" in rotation should normally be thought of as pseudovector (angular velocity), not a quaternion. If you integrate the angular velocity for a time delta_t, you can think of the result as a quaternion, and then what you are saying is correct.

### #51101  Members

100
Like
0Likes
Like

Posted 03 June 2011 - 02:08 PM

The objects your are describing are not "septernions": You are talking about the orientation-preserving isometries of the three-dimensional Euclidean space, which form a 6-dimensional Lie group. An element of this group can be described by just a quaternion and a translation, and you can define the operation of composition fairly easily (multiply the quaternions, add the translations, but you have to rotate the translation using the quaternion of the other isometry; if you are careful you'll get it right).

haegarr is right to point out that "rate of change" in rotation should normally be thought of as pseudovector (angular velocity), not a quaternion. If you integrate the angular velocity for a time delta_t, you can think of the result as a quaternion, and then what you are saying is correct.

O well, was curious if this would work because it would be sort of neat. Also haegarr your correct in saying quaternions can't hold the rate of change in orientation, what I currently do is convert the speed of rotation around an axis into a quaternion using the speed as the angle (it works anyways).

### #6Storyyeller  Members

215
Like
0Likes
Like

Posted 03 June 2011 - 02:39 PM

If you want to describe translation and rotations, the easiest way is to just use 4x4 matrices. That's what graphics libraries do anyway.
I trust exceptions about as far as I can throw them.

### #7quasar3d  Members

810
Like
0Likes
Like

Posted 04 June 2011 - 03:34 AM

First of all, I think it's much easier to just represent your rigid motion as a rotation translation (ie. quaternion vector) pair.

But if you really want to have a single number that describes both a rotation and a translation, then learn about dual quaternions (http://en.wikipedia.org/wiki/Dual_quaternion), for they allow you to describe a rotation and a translation in a single dual quaternion, which can be applied to a vector in a way similar to what you do with normal quaternions.

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.