-
Notifications
You must be signed in to change notification settings - Fork 447
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
Rotation axis #198
base: master
Are you sure you want to change the base?
Rotation axis #198
Conversation
cross reference: #191 |
I’ll take a look tomorrow. Bug me about it please? ;-)
NOTE: The information in this message and any attachments is confidential |
var cs = (rot[0] + rot[4] + rot[8] - 1.0)*0.5; | ||
var angle = Math.acos(cs); | ||
angle = isNaN(angle) ? 0.0 : angle; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A reasonably clear derivation can be found here: http://en.wikipedia.org/wiki/Axis–angle_representation#Exponential_map_from_so.283.29_to_SO.283.29
Also see the log map section.
PROBLEM: The output of rotationAxis is normalized var sin = Leap.vec3.len(this.rotationAxis(sinceFrame)); This has been addressed by re-deriving the axis of rotation without normalization. NOTE: The equations used here (which match those used in platform) will result in an undefined rotation at 180 deg. The formula used here conforms to the Leap math standards.
Making hand rotationAngle consistent with frame rotationAngle
Correcting variable name rotation -> rot.
WIP - this still needs to be confirmed, and the tests updated to match. CC @GabrielHare