# Quaternions and Angle/Axis

This topic is 4729 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hey guys. I'm just getting into quaternions which is working out well, except for one thing. I don't really understand how to build my axis-angle representation for my vector n; where the quaternion is [w (nx ny nz)]. As an example, say I want to rotate 30 degrees around the x-axis and 55 degrees around the y-axis; how can I use those values to build my axis-angle? I realize that I can create two separate quaternions for each rotation and multiply them together, but for the sake of learning I'd like to try it this other way. Thanks! :)

##### Share on other sites
Quote:
 Original post by GaryNasAs an example, say I want to rotate 30 degrees around the x-axis and 55 degrees around the y-axis; how can I use those values to build my axis-angle? I realize that I can create two separate quaternions for each rotation and multiply them together, but for the sake of learning I'd like to try it this other way.

I don't know of any other way. What you're doing, of course, is using euler angles to generate a quaternion. And multiplying several axial rotations together is "how it's done". HUTTAH!

##### Share on other sites
It is easier to just multiply the 3 quaternions as Sneftel suggests, but for the sake of learning you might go the extra step of reducing the math. The quaternions are
    qX = [ sin α/2, 0, 0, cos α/2 ]    qY = [ 0, sin β/2, 0, cos β/2 ]    qZ = [ 0, 0, sin γ/2, cos γ/2 ]
and a lot of terms should drop out when you multiply the quaternions.

1. 1
2. 2
Rutin
22
3. 3
4. 4
khawk
14
5. 5

• 13
• 26
• 10
• 11
• 44
• ### Forum Statistics

• Total Topics
633743
• Total Posts
3013643
×