Hacker News new | ask | show | jobs
by matmann2001 483 days ago
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?
15 comments

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)

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!
Maybe because it intersects deeply with game dev?
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.

What in particular did you find difficult about dealing with them?
There was something called a slerp that allowed you to get an object to rotate from on orientation to another, similar to a linear interpolation.

This was fine for some things. but if you wanted something to rotate but only in a certain way it was annoying as sometimes it would get from A to B, but go through Z during its rotation.

Getting the order or multiplications right too.

Spherical linear interpolation, slerp https://en.wikipedia.org/wiki/Slerp (which can sometimes wrap around the wrong way)

For levity, see Acts 12:4 And when he had apprehended him, he put him in prison, and delivered him to four quaternions of soldiers to keep him.

Maybe it's aspirational: things that people don't know, and would like to learn, and perhaps use one day.
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.

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.
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.
They're both simple to motivate and complicated enough to have an allure.
Because quaternions are awesome? :) it definitely feels like a discovery when you learn about them first.
Are they?

[Let's remove Quaternions from every 3D Engine] https://marctenbosch.com/quaternions/

I feel like there should be a followup post "Dear Sir, you have reimplemented quaternions" noting how implementing GA and using it only in 3D gets you precisely right back to quaternions-but-with-a-different-name since they're isomorphic when specialized for 3D.
HN's going to need a windscreen cleaner and a bucket if 3blue1brown and Terence Tao ever collaborate on using adaptive Kalman filters for optimal paths in Quaternion spaces.
no worries, quaternions just make the usual rotations. It’s cyclic.
Others have mentioned game dev, but they're also essential for guidance, navigation, and control - spacecraft, aircraft, robotics, etc.
Because quaternions are so cool yet under-appreciated. Unfortunately not many octonion posts.
Octonions are cool! The one application I’m familiar with is in crystallography - you can represent the interface between two crystals with a unit octonion https://doi.org/10.1016/j.actamat.2018.12.034

(Open access pdf: https://par.nsf.gov/servlets/purl/10098941)

Can you give some pointers to other interesting applications?

It's because the quaternion is part of the state of the Kalman filter.
Not in any intrinsic way, it’s just a mildly better way of representing attitude if your state vector includes attitude.
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.
They are posted by the Quaterminions.