Mathematical constructions, number systems. In 3D-graphics quaternions are used alongside vectors and matrices. One of the benefits of quaternions is that they overcome some rotational problems (known as gimbal locks) that are inherent to vectors and matrices.
Questions tagged [quaternion]
387 questions
15
votes
1 answer
Quaternions and rotation around world axis
Disclaimer: I am a professional games programmer, and use quaternions most days but they are close to black magic to me. I am relatively at home with math but imaginary numbers always confused me. I tend to treat quats as useful and end up reversing…

Kaj
- 3,246
- 21
- 18
7
votes
2 answers
How do I correctly use dual quaternions for rotation and translation of an object?
Up until now I've handled a given object's rotation and translation separately using normal quaternions for rotation and vectors for translation. However I'd like to use dual quaternions to handle both an object's translation and rotation as I plan…

1101
- 133
- 1
- 4
6
votes
2 answers
How do I extract a translation vector from a dual quaternion?
I'm trying to do some things with rigid body dynamics using dual quaternions (these are not the same thing as normal quaternions!) and I'm so close to getting things to work. The problem I'm having is extracting the translation vector from a dual…

1101
- 133
- 1
- 4
4
votes
1 answer
Quaternion handedness issue
At least I think it is. I have the following functions:
kmQuaternionRotationAxis - Constructs a Quaternion from an axis and angle
kmMat4RotationQuaternion - Constructs a 4x4 matrix from a quaternion
kmMat4RotationAxisAngle - Constructs a 4x4 matrix…

Kazade
- 590
- 2
- 5
- 14
3
votes
1 answer
What is the rationale behind this method of computing the w-component from MD5 mesh files?
In tutorials regarding the MD5Mesh format, like this one, we often see code like
float t = 1.0f - (q.x * q.x) - (q.y * q.y) - (q.z * q.z);
if (t < 0.0f) {
q.w = 0.0f;
} else {
q.w = -sqrt (t);
}
for computing the w-component of a unit…

pcapp
- 33
- 2
2
votes
1 answer
Quaternion Orientation / Sensor
I am posting here even though this isn't technically a game development question, but involves quaternions.
I have a 9-axis sensor which gives me a world-frame (gravity, magnetic-north) quaternion representing it's orientation. It's mounted on the…

Tim Clark
- 21
- 1
1
vote
1 answer
How should I handle quaternion types, in my game engine?
I've recently been coding a quaternion class, for my game engine, and have run into a problem. Firstly, should I be using unit quaternions for my engine? Secondly, should I have the functions automatically normalise the quaternion, or should I leave…

Tyson May
- 13
- 3
0
votes
0 answers
Convert a quaternion from NED right handed to ENU left handed
My drone's camera rotation is calculated using NED Right handed quaternion and I want to convert it to ENU left-handed.
0
votes
1 answer
Relationship between equal-magnitude quaternions with different components
What is the relationship called between two quaternions that are equal in magnitude, but different in component values? They are not necessarily unit quaternions.

shawn_halayka
- 51
- 1
- 5
0
votes
0 answers
Quaternian coefficient multiplication
I have 2 quarternians (Q1 & Q2), I'd like to apply a coefficient to each Quaternian, where the sum of both coefficients = 1. As far as I'm aware, multiplying a quaternian by another is equivalent to adding them together.
In linear mathematics, this…

Craig
- 101
0
votes
2 answers
Set rotation on single axis with provided angle using Quaternion
I am using a Quaternion to represent the rotation of some object, and I would like to allow the user to rotate it about a single axis at a time using textbox, so he would write the angle that the object is rotated by (ex. at X-axis), then the object…

O-BL
- 103
- 1
- 4