[HN Gopher] Rediscovering Quaternions
___________________________________________________________________
Rediscovering Quaternions
Author : jfantl
Score : 53 points
Date : 2025-02-26 17:17 UTC (5 hours ago)
(HTM) web link (jasonfantl.com)
(TXT) w3m dump (jasonfantl.com)
| pvg wrote:
| Related a few weeks ago
| https://news.ycombinator.com/item?id=42880242
| matmann2001 wrote:
| Not detracting from this post, but has anyone else noticed
| there's a front page post about Quaternions or Kalman filters on
| about a monthly cadence? Wonder why that is?
| Jarmsy wrote:
| I have noticed too that HN has an enduring fascination with
| quaternions, and they seem to reach front page surprisingly
| frequently (considering that there's not a huge amount of
| discussion of other geometry topics). I'm certainly not
| complaining though - I love quaternions too!
| mettamage wrote:
| Maybe because it intersects deeply with game dev?
| lawlessone wrote:
| yes, that's the module i learnt about them in during college.
|
| IMHO I think for me they're interesting because it felt like
| mathematically they straddle the line of being nearly
| impossible for me.
|
| I could just barely do them and felt very accomplished when I
| could. Anything else was either impossible or easy by
| comparison.
|
| assuming my maths skills are average here then most people
| have similar experiences with them.
| hassleblad23 wrote:
| Because quaternions are awesome? :) it definitely feels like a
| discovery when you learn about them first.
| orangea wrote:
| At least this is a topic that the average HN reader is likely
| to be able to understand and which is closely related to
| software. Several years ago there was a period where there were
| periodic posts about things like homotopy type theory and
| research-level algebraic geometry which inevitably spark only
| inane misunderstandings and uninformed speculation in the
| comments. I can only attribute it to some kind of fetish for
| the frontiers of pure math.
| kisonecat wrote:
| AG maybe isn't so connected to software, but HoTT connects to
| the "functional programming" crowd.
| https://youtu.be/MVtlD22Y8SQ is me doing some examples.
| adalacelove wrote:
| It's because the quaternion is part of the state of the Kalman
| filter.
| ballooney wrote:
| Not in any intrinsic way, it's just a mildly better way of
| representing attitude if your state vector includes attitude.
| TaurenHunter wrote:
| They are posted by the Quaterminions.
| paulddraper wrote:
| Quaternions and spherical trigonometry -
| https://news.ycombinator.com/item?id=42880242 - Jan 2025 (48
| comments)
|
| Visualizing quaternions (2018) -
| https://news.ycombinator.com/item?id=38043644 - Oct 2023 (42
| comments)
|
| Visualizing quaternions: an explorable video series (2018) -
| https://news.ycombinator.com/item?id=31083042 - April 2022 (15
| comments)
|
| Visualizing quaternions: An explorable video series -
| https://news.ycombinator.com/item?id=18310788 - Oct 2018 (32
| comments)
| ofalkaed wrote:
| I never noticed it until I read Pynchon's Against the Day, I
| assume I just ignored quaternion posts before then. Great book,
| enjoyed the way he used quaternions and vectors towards
| literary ends.
|
| Edit: just noticed we also have a thread on bifurcation,
| another big topic in Against the Day.
| mhh__ wrote:
| They're both simple to motivate and complicated enough to have
| an allure.
| ballooney wrote:
| They're both quite basic building blocks in state estimation
| and as SV's focus shifts from web apps to drone warfare it will
| only increase in frequency.
| gcr wrote:
| no worries, quaternions just make the usual rotations. It's
| cyclic.
| r1chardnl wrote:
| If I had to describe Quaternions to someone I would first try to
| explain a Plane (Ax + By + Cz + D = 0) to them. ABC being a
| (normal) direction that the Plane is pointed towards and D being
| the distance from the origin.
|
| A Quaternion from what I believe is just the same but instead of
| distance it just encodes the rotation around that direction as a
| fixed axis. (Instead the angle stored is half etc).
|
| Feel free to correct me if I'm wrong, I'm not a math-heavy
| person.
| adamhartenz wrote:
| If you a explaining this to the average American, you are going
| to have to start a bit further back than a "Plane".
| grg0 wrote:
| Think of a fraction as a pizza. The bottom number is how many
| slices the pizza has, and the top number is the slices that
| you are going to eat. Sally will eat the rest, so you need to
| leave some for her.
| ge96 wrote:
| In the beginning... there was nothing...
| sundarurfriend wrote:
| > A Quaternion from what I believe is just the same but instead
| of distance it just encodes the rotation around that direction
| as a fixed axis. (Instead the angle stored is half etc).
|
| The first part kinda makes sense, but I have no idea what the
| paranthetical is intended to mean.
| aithrowawaycomm wrote:
| > These discontinuities are not just an artifact of poor
| implementation; it can be proven that any representation of 3D
| rotations using only three values must contain discontinuities.
|
| This is a bit pedantic - and the blog post actually does clarify
| this - but the problem isn't that a 3D representation of
| representations has "discontinuities" as such, it's that it's not
| orientable in Euclidean 3D space. It is similar to the Klein
| bottle - the mathematical description is continuous, but any
| Klein bottle made of real-world glass has to intersect itself. Or
| likewise that a Mobius strip can be demonstrated in 3D but can't
| be built in Flatland without a 3D entity doing the copy-pasting.
| Reality just has the wrong topology to represent the full group
| of rotations. Hence the discussion about projective space later
| in the blog post.
|
| So adding a fourth gimbal is really tantamount to a correctly-
| oriented embedding of 3D rotations onto a 4-torus (that is,
| [0,2pi]^4).
|
| Gimbal lock also relates to another issue of continuity, related
| to the "plate dance."[1] Rotations themselves have a sense of
| continuity (infinitesimal differences in either the angle or axis
| of rotation, aka they are Lie groups), but Euler angles fail to
| respect the equivalent fundamental theorem of calculus: adding a
| bunch of infinitesimal changes might say you are at the identity
| rotation according to Euler angles, but in reality you have
| flipped the meaning of the right-hand rule and the overall state
| of the system is not at the identity. In a robotics context, the
| robot's hand might have done a complete rotation, but its arm is
| twisted without the robot "knowing." I believe robotic arms used
| to have a serious problem with this, either overrotating and
| breaking the arm, or swinging dangerously fast in the opposite
| direction. Using quaternions / a fourth gimbal / etc. there would
| be a measurable phase or pole indicating the true state of the
| system, and letting the robot know how to rotate its arm without
| malfunctioning. So, like the Apollo mission, the need for a
| fourth dimension to keep track of that stuff - and even the
| quaternion multiplication structure - comes about pretty
| naturally without ever thinking about abstract math.
|
| [1] https://en.m.wikipedia.org/wiki/Plate_trick
| cantalopes wrote:
| I was hoping thered be more of actual quaternions
___________________________________________________________________
(page generated 2025-02-26 23:00 UTC)