Public Group

#### Archived

This topic is now archived and is closed to further replies.

# Quaternions

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

## Recommended Posts

I understand that orientations (rotations) can be represented as quaternion e.g. (0 0.38268 0 0.92388) represents a 45 degree rotation along the X axis. I can work the calculation for this quaternion backwards and get 44.999 degrees as the answer. But what about this (0.35355 0.35355 0.14645 0.85355)? I know the X and Y axis are involved, but stumped on how you calculate the angle(s) used in this example. Any ideas????

##### Share on other sites
Here is a simplified way to get the axis/angle representation from a quaternion:
halfangle = acos( w ); // in radiansangle = halfangle * 2; // in radiansaxisX = x / sin( halfangle );axisY = y / sin( halfangle );axisZ = z / sin( halfangle );

##### Share on other sites
Thanks. I''ll try it out although it looks similar to a formulae I''m using already.

##### Share on other sites
BTW, [ 0 0.38268 0 0.92388 ] represents a 45 degree rotation around the Y axis (assuming the elements are [ x y z w ]).

Maybe that is the problem -- [ x y z w ] vs. [ w x y z ].

1. 1
Rutin
65
2. 2
3. 3
4. 4
5. 5

• 18
• 10
• 30
• 20
• 9
• ### Forum Statistics

• Total Topics
633416
• Total Posts
3011771
• ### Who's Online (See full list)

There are no registered users currently online

×