Matthew Alpert
Reputation
Top tag
Next privilege 125 Rep.
Vote down
 Jan19 awarded Popular Question Jul28 awarded Announcer Apr24 awarded Scholar Apr24 accepted Nullify (zero out, cancel) rotation in an arbitrary axis in a Quaternion Apr24 comment Nullify (zero out, cancel) rotation in an arbitrary axis in a Quaternion Ah ha, I see! Well it seems we've finally settled on a solution. I'm glad we were able to work this out. Thanks for all your help. Apr24 revised Nullify (zero out, cancel) rotation in an arbitrary axis in a Quaternion added 22 characters in body Apr24 revised Nullify (zero out, cancel) rotation in an arbitrary axis in a Quaternion added 22 characters in body Apr24 comment Nullify (zero out, cancel) rotation in an arbitrary axis in a Quaternion @rschwieb You're right that I have the vector rotation wrong, but isn't it actually the conjugate, not the inverse, that you're supposed to use ($p'=qpq^{*}$)? As for the angle, I chose $p$ to be a unit vector perpendicular to $r$. So $p$ is in the plane defined by the normal $r$. So when $p'$ is projected into that plane forming $p''$, the arc swept out between $p$ and $p''$ must lie in that plane as well. Thus, the Quaternion $z$ will rotate the object back around $r$, bringing $p$ in line with $p''$. Isn't that right? Apr12 awarded Commentator Apr12 comment Nullify (zero out, cancel) rotation in an arbitrary axis in a Quaternion @rschwieb Yes, that's what my original question was. I was simply unable to come up with a scenario to explain it before (to the point where I thought it was impossible). But I think the scenario I've come up with in this answer does address my original question. Do you agree with that? And if so, do you think my answer here works? Apr11 answered Nullify (zero out, cancel) rotation in an arbitrary axis in a Quaternion Apr11 comment Nullify (zero out, cancel) rotation in an arbitrary axis in a Quaternion Very nice. This is similar to my solution for a related problem. I again wanted to align a vector v1 with another vector v2, but v1 could only be rotated around a specified axis (so v1 and v2 might not perfectly align). The solution was to project (v2-v1) onto the plane defined by the desired axis of rotation. Then get the angle and do the rotation. Apr5 awarded Student Apr3 comment Nullify (zero out, cancel) rotation in an arbitrary axis in a Quaternion I agree. Chat is a little tough though (because of my schedule). Email would be easier. But there's no way for us to privately exchange email through stackexchange. Apr1 comment Nullify (zero out, cancel) rotation in an arbitrary axis in a Quaternion In trying to come up with an example, I'm starting to think what I'm asking for can't be defined. Here's an alternative question: How would you restrict rotation to an arbitrary axis? Example: We have a sphere with a dot painted on the surface. A ray from the center of the sphere through the dot points to some fixed point $p$ and defines our axis $r$. We have a Quaternion $q$ that when used to rotate the sphere causes the dot to no longer point at $p$. The question is, how do we modify the Quat $q$ so that the dot still points at $p$? How do we restrict rotation to the axis $r$? Apr1 comment Nullify (zero out, cancel) rotation in an arbitrary axis in a Quaternion For the line x=y, for it to make sense, that line would have to be fixed in the world coordinates. Then you could rotate the object around it. In that case, I believe the object's local x, y and z axes would get pointed in different directions. Apr1 comment Nullify (zero out, cancel) rotation in an arbitrary axis in a Quaternion Ah, I see. There is indeed some important subtlety here. If we rotate an object around the z-axis, the object does not experience rotation around the x-axis. However, the local x-axis of the object does get pointed in a different direction. That is, the coordinate frame local to the object is transformed. Mar30 comment Nullify (zero out, cancel) rotation in an arbitrary axis in a Quaternion So you're suggesting decomposing the quaternion rotation into its three Euler rotations, then zeroing out one of the Euler rotations, and finally reconstructing the quaternion? I think that would work, however, it seems like that could only be used to cancel out rotation around one of the cardinal axes. How would you do it for an arbitrary axis? (Though, I do think that decomposing the quaternion is probably a step of the solution. Perhaps it would be useful to convert it to a 3x3, 4x3, or 4x4 matrix representation. But now we're really out of my area of expertise.) Mar30 comment Nullify (zero out, cancel) rotation in an arbitrary axis in a Quaternion I don't think I have the vocabulary to explain it better then the edited version of my question above. The only other thing I could say is that I'm basically asking for the opposite of your answer. You guessed I would like to pick which axis I rotate around. But what I actually want is to modify a quaternion rotation so that no measurable rotation occurs around a specified axis at all. Mar28 comment Nullify (zero out, cancel) rotation in an arbitrary axis in a Quaternion Sorry for the confusion. I have heavily edited my question for clarity. Please re-read it. Thank you.