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?

5
  • 1
    Look at my answer here stackoverflow.com/questions/3684269/… This function split rotation into two components , parallel to passed axis and perpendicalar to passed axis. This look exactly what you want. Commented Oct 19, 2015 at 8: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. Commented Oct 20, 2015 at 2:56
  • It finds two quaternions one is " component of rotation along a certain direction" and second is "substraction" of this component from original rotation Commented Oct 20, 2015 at 7: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? Commented Nov 8, 2015 at 6: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 Commented Nov 9, 2015 at 8:05

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.