-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation #29
Comments
At the time of this writing, there is no specialized function (though I'll add one in the next week or two). So the way to go for now is to just use quaternion multiplication. For example, if you have a 3-vector V = quaternion.quaternion(0, *v) Then you can rotate it as Vprime = R * V * R.conj() [If you're not sure if Vprime.vec This, of course, is relatively slow because the operation count is higher than it needs to be (32 multiplies and 24 adds). I can cut the operation count almost in half (18 multiplies and 12 adds) by using a specialized function. I'll leave this open until I implement that. |
Has there been any progress on this? the ability to apply Quaternions to vectors is likely to be a key component in any project that uses Quaternions. |
As I said above, it is currently possible, it's just that it could be made more efficient. I've been trying to figure out the best approach, because numpy doesn't make this particular task very easy. I will say that if you're interested in using the same quaternion to rotate multiple vectors — as opposed to using different quaternions for each rotation — it's most efficient to convert the quaternion to a rotation matrix (using But achieving my original objective is proving more difficult than I had hoped. I'll keep this thread posted with any developments. |
How do I rotate a vector, let's say (0, 0, 1), using the quaternion? I couldn't find the function in the documentations (there is a lots of quaternion manipulation, but is there a transform/apply function)?
The text was updated successfully, but these errors were encountered: