0

For example, to subtract out the component of a vector a along unit vector b, you just take the dot product of a and b and multiply by the vector b. Then you just subtract a•b*b from a to take out the component of the vector along b.

How do you do this for a rotation? Rotations can be represented by euler angles, rotation matrices, or quaternions. The quaternion is a certain rotation about an euler axis, but how do you subtract out the component of the rotation about a given axis?

SwiftMatt
  • 949
  • 1
  • 9
  • 19
  • 1
    Look at my answer here http://stackoverflow.com/questions/3684269/component-of-a-quaternion-rotation-around-an-axis/22401169#22401169 This function split rotation into two components , parallel to passed axis and perpendicalar to passed axis. This look exactly what you want. – minorlogic Oct 19 '15 at 08:21
  • I believe I saw your post before. However, it only finds the component of rotation along a certain direction, but does not instruct how to subtract such a thing from a quaternion. – SwiftMatt Oct 20 '15 at 02:56
  • It finds two quaternions one is " component of rotation along a certain direction" and second is "substraction" of this component from original rotation – minorlogic Oct 20 '15 at 07:38
  • q.x = x * sin(theta / 2) q.y = y * sin(theta / 2) q.z = z * sin(theta / 2) q.w = cos(theta / 2) Is your solution assuming that is how quaternions are represented? Because if you simply project onto x, y, and z without anything else and then just add q.w onto the end of the twist or swing or whichever it was, I feel like it doesn't likely represent what I am trying to do here? – SwiftMatt Nov 08 '15 at 06:37
  • You decide represent or not, anyway i don't know other similar decomposition. Try to verify using geometric meaning. It exactly does Swing Twist decomposition – minorlogic Nov 09 '15 at 08:05

0 Answers0