Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix real part of quaternion derivatives (#488)
* Fix real part of quaternion derivatives In the Taylor expansion of a quaternion rotation, the first-order term should be purely imaginary. Seems like something got translated incorrectly in the change from xpbd to the current integrator * Update snapshot * Replace the first-order expansion of rotation with true rotation This should improve the accuracy of rotations, in particular for faster rotation rates (> approx 0.5 radians per substep for a previous error of 5% in rotation rate) * Add a .renormalize() method on 3D Rotations Wasn't sure of the best way to handle this: * `(self) -> Self` vs `(&mut self) -> ()` * impl on Rotation vs Quaternion (would be harder because it doesn't belong to Avian) * Simplify quaternion scalar multiply Replace the weird thing I was doing with something that should also work in f64 * Update cube simulation snapshot
- Loading branch information