News for hackers. Stuff that matters.
Re:Quaternions: A Practical Guide by ogogmad on Monday August 15, 2022 @12:35PM (#32471859)
Haven't dual quaternions taken over for their ability to represent all rigid body motions?

Quaternions are still important for building intuition for dual quaternions.

Re:Quaternions: A Practical Guide by mrjet on Monday August 15, 2022 @01:34PM (#32472706)
I can only answer for robotics:

Dual quaternions haven’t really taken over. While there’s no universal way that people end up handling rigid body transforms, SO(3) + R3 for rigid body transforms are the norm in robotics.

Some robotics orgs choose a single representation for SO(3) — usually quaternions or matrices — and use it everywhere. Note that quaternions are more space efficient and easier to normalize, but require 2x more operations to rotate a vector [1]. So you might see a quaternion shop use matrices in a hot loop for transforming 3D points. And a matrix shop might use quaternions in a hot loop for composing many transformations. Usually you have many fewer rigid body links than points in an e.g. pointcloud so it is performance favorable to use matrices.

A final comment: Most users in a codebase should interact with rotations through a rotation library like Sophus or Manif. That library should implement left/right lerp, splines, “rotate a vector” and “compose a transformation”. There is basically never a need for a developer to know what rotation representation is being used to compute the rotation.

If such a library is correctly implemented, you can even use Euler Angles as the underlying representation and never experience gimbal lock.

[1] https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotati...

Re:Quaternions: A Practical Guide by ajkjk on Monday August 15, 2022 @01:28PM (#32472610)
I don't think so? Most game engines for instance implement quaternions for ie slerp, but wouldn't mention dual quaternions, which are much more niche (used for translation + rotation at the same time).
Re:Quaternions: A Practical Guide by ajkjk on Tuesday August 16, 2022 @10:34AM (#32483261)
* ie -> eg
Re:Quaternions: A Practical Guide by meheleventyone on Monday August 15, 2022 @01:13PM (#32472424)
Mostly in jointed hierarchies like robotics and skeletal animation in my experience. Otherwise quaternions dominate for representing rotation and translation and scale are kept separately. Even further in an editor you might represent the rotation as Euler angles.
Re:Quaternions: A Practical Guide by bodhiandpysics1 on Monday August 15, 2022 @03:13PM (#32473948)
In graphics, dual quaternions are used in skinning, but rarely for orientation and translation.
Re:Quaternions: A Practical Guide by percentcer on Monday August 15, 2022 @02:06PM (#32473165)
As you pointed out, you still need regular ol' quaternions if you're dealing with non-rigid transforms (e.g. in animation where there's some scaling transform involved as well)
Re:Quaternions: A Practical Guide by bodhiandpysics1 on Monday August 15, 2022 @03:14PM (#32473960)
which is very very very common (squatch and stretch)
Re:Quaternions: A Practical Guide by gfxgirl on Tuesday August 16, 2022 @12:56PM (#32485576)
geometric algebra is replacing quaternions because GA handles tons of edge cases that quaternions don't?