Talk:Quaternions and spatial rotation

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Compared to rotation matrices[edit]

The article says

"Compared to rotation matrices they are more compact, more numerically stable, and more efficient"

However, quaternion rotation requires 24 add/mul operations but a 3x3 matrix requires only 15 add/mul operations. Also, the "more numerically stable" claim is unjustified and I cannot find a reference. — Preceding unsigned comment added by 80.47.47.163 (talk) 15:22, 19 May 2020 (UTC)[reply]

I'm not sure where are those numbers from. As far as the number of operation goes, quaternions require less operations to compose rotations and more operations to apply a rotation to a vector. What ends up being more efficient depends on the application.
Besides, efficiency is not only the number of mul/adds. Quaternions take less than half the memory and, accordingly, bandwidth. Which is, again, important in some applications (e.g. tangent space calculations on a GPU).
Applying and composing rotations aren't the only operations to consider either. Quaternions are easier to interpolate (again, useful for tangent space calculations on a GPU for example, but also for animation, modeling, etc...).
"more numerically stable" -- this is un-doubtfuly true. When repeatedly composing rotations (eg in rigid body simulations) rotation matrices will inevitably become non-orthogonal. There are different ways to re-orthogonalize them, trading off precision and performance. In contrast to those, quaternions don't suffer from that issue at all. bungalo (talk) 20:09, 19 May 2020 (UTC)[reply]

Labelling the formulas in the Alternative Convention section[edit]

The paragraph argued that usage of the Shuster convention is discouraged, as did the cited article "Why and How to Avoid the Flipped Quaternion Multiplication" by Sommer et. al. But the formulas in the paragraph are not clearly distinguished (except by red minus signs). These formulae are beginning to show up on Google Images out of context, creating a lot of confusion to students. I tried to add labelling "\qquad \text{alternative Convention, usage discouraged} to the right of the formulas but the edit got reverted by a anti-vandalism bot. If anyone (especially registered users) agree, please help with the edit.184.147.40.19 (talk) 04:04, 25 January 2022 (UTC)[reply]

I already reversed the bot edit a few minutes ago. [1] I'll just nod and pretend I knew for sure it wasn't vandalism. Cheers. signed, Willondon (talk) 04:14, 25 January 2022 (UTC)[reply]

Recover Axis Angle[edit]

Since quaternions are rotations about arbitrary axis, it makes sense as a matter of convention that the angle is always a non-negative number. Moreover, the angle must always be in the 1st and 2nd quadrant as all other quadrants have equivalent negative angles. If for example we want to represent a rotation of about the axis, this is entirely equivalent to a rotation of about the axis.

So indeed the formula to recover the rotation angle presented will indeed produce the correct answer, in the 1st and 2nd quadrants because thee first argument is always going to be positive, but it is un-necessarily complicated. I propose to recover the angle we simply use

which also produces results in the 1st and 2nd quadrants, Once the angle is recovered, then the axis is simply the vector part divided by the sine of the half angle

— Preceding unsigned comment added by Jalexiou (talkcontribs) 16:26, 11 June 2022 (UTC)[reply]

rotations and matrices[edit]

A geometric fact independent of quaternions is the existence of a two-to-one mapping from physical rotations to rotational transformation matrices.

Shouldn't that be the other way around? That is, one rotation has two representations – not that one matrix can represent two rotations. —Tamfang (talk) 05:41, 2 August 2023 (UTC)[reply]