Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Thanks for the feedback. You may find https://www.jeremyong.com/klein/geometry-potpourri/ more approachable but I admit I don't have finalized material I'm completely satisfied with showing yet :(

The math is definitely more easy to grok if you've seen/used Lie Algebra/Group formalisms before so that's another shortcoming, but the main thing GA gives us here is a "dual-quaternion slerp" which I literally could not find an implementation of anywhere! The formula for a quaternion slerp is actually not too hard to derive, but a dual-quaternion slerp is far more difficult. Part of the point of the post was that this was somewhat surprising to me (both that GA makes it approachable, and that dual-quaternion slerp implementations didn't exist in the wild).



Thanks! I'm curious what motivated you to want to use a dual quaternion or why you want a slerp algorithm for that. I have yet to run across a use for a dual quaternion. Wikipedia says that they are used in mechanics to represent rigid transformations. That sounds useful for animation but most animation or computer graphics people would represent a rigid transformations with a quaternion and a translation vector, and if interpolating a rigid transformations they would slerp the quat and linearly interpolate the translation. So I'm not sure what the advantage of a dual quaternion would be in this context, or do you use dual quaternions in some completely different way?


Thanks for the questions. Indeed many animation libraries store the quaternion and translation as separate components. There are a few reasons I use dual-quaternions in my own code. First, because I can "slerp" them, this means that when I compress keyframes, and can perform better quality fits (potentially less error and fewer keyframes needed). The dual-quaternion has uses in skinning which I'm sure you're aware of, but if the base transformation is a dual quaternion, I can more efficiently morph neighboring vertices as well (I've ported the dual-quaternion application to shader code as well). One optimization that GA makes clear is the ability to factor out terms when applying a dual quaternion to a number of entities all at once which makes it almost as efficient as a quat-translation while conserving energy as well.

Finally, the dual-quat representation is beneficial when modeling kinematic motion specifically (not necessarily artist-authored) which can be useful in contexts beyond games (e.g. robotics, deep-learning, computer vision), but also inverse kinematics (which unfortunately I haven't had time to write about yet)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: