#dual-quaternion #dual #quaternions #lie-theory #skinning

bin+lib dq

A complete implementation of dual quaternions

1 unstable release

Uses old Rust 2015

0.1.0 Mar 20, 2019

#5 in #dual-quaternion

BSD-3-Clause

19KB
433 lines

dual_quaternion.rs

This is an implementation of dual quaternions based on nalgebra & dual_num.

The trigonometric implementation differs slightly from what one might find online (e.g. wikipedia). Quaternions form a non-commutative algebra and multiplications by u' should actually be in the other order. E.g. sin(u, u') = (sin(u), u'*cos(u)) should actually be sin(u, u') = (sin(u), cos(u) * u').

https://github.com/potan/dual.rs/blob/master/src/lib.rs

https://blog.demofox.org/2014/12/30/dual-numbers-automatic-differentiation/

https://idontgetoutmuch.wordpress.com/2013/10/13/backpropogation-is-just-steepest-descent-with-automatic-differentiation-2/

https://github.com/hoechp/ultracomplexmath/blob/954c19190e/src/util/hypercomplex/Dual.java

note that trigonometry diverges at certain places from idontgetoutmuch as quaternions are non-commutative

TODO

  • trigonometry is a bit off

Dependencies

~4MB
~70K SLoC