Live data from Hacker News

Quaternions

liorsinai.github.io

81–90 of 118 posts

Re: Quaternions

#81

Earlier quoted context omitted.

It seems to me that i, j, and k are three things that have the same property, not three identical things.

TIL that not every imaginary number is just "i" with optional scaling applied. Was taught "the square root of negative one is i".

i wish i was taught in terms of euler' formula, which is probably the most useful: https://en.wikipedia.org/wiki/Euler%27s_formula

Re: Quaternions

#83
post #49

I first encountered quaternions in the concept of abstract algebra. It's interesting to think of it as part of a spectrum starting with reals and continuing to octonions (and beyond). Interestingly with each extension we lose something: Complex numbers (2-dimensional): No more ordering Quaternions (4-dimensional): No more commutative multiplication Octonions (8-dimensional): No more associative multiplication Sedenio…

Why do you think the dimensions are in powers of two?

Re: Quaternions

#84

One interesting thing about quaternions that’s almost never mentioned anywhere on the internets, there’re two conventions for them. The convention in that article is known as “Hamilton's quaternions”. There’s another incompatible one usually called “JPL quaternions”, for some American Jet Propulsion Laboratory. Authors of 99% articles about the quaternions, and software libraries implementing quaternions, are assumin…

you also see the variations from the group structure;

https://en.wikipedia.org/wiki/Quaternion_group

Re: Quaternions

#85

One interesting thing about quaternions that’s almost never mentioned anywhere on the internets, there’re two conventions for them. The convention in that article is known as “Hamilton's quaternions”. There’s another incompatible one usually called “JPL quaternions”, for some American Jet Propulsion Laboratory. Authors of 99% articles about the quaternions, and software libraries implementing quaternions, are assumin…

I remember reading some library quaternion code (sorry can't remember which library) that started out with a lovely quote from Hamilton on how the idea burst into his mind in a flash as he walked with his wife near the river Liffey I think it was in Dublin. So I guess they mentioned it, at least indirectly.

Re: Quaternions

#86
post #76

Earlier quoted context omitted.

GA is much slower in practice and takes more to store. In places speed and cache are important, quaternions are much better. Game engines don't need much if anything from GA (and I've written about using GA decades ago for software, and did it for some time, before realizing that trading that elegance for worse performance was not worth it). Here's [1] one example from the godfather of GA demonstrating how poorly GA…

I have done some experiments with type-directed static optimization of geometric algebra, but I didn’t get far enough to find out if it would scale up to real applications. The idea was to represent in the type system which components are known to be zero, so that (for instance) the GA representation of a vector or a rotation is the same size as it would be as a traditional matrix-based linear algebra. And the type s…

i've played with some libraries recently in julia that followed this strategy; https://discourse.julialang.org/t/ann-cliffordalgebras-jl/71...

and I was surprised at how high dimensionality you could go. I'd like to see a c++20 version.

Re: Quaternions

#87

Ask HN: Do quaternions have any interesting properties, akin to those of complex numbers, when calculus is applied? The only application I've ever seen is for doing rotations in computer graphics.

per wikipedia (hence the interest in twistors, spin spaces and clifford algebras in physics):

Quaternions also capture the spinorial character of rotations in three dimensions. For a three-dimensional object connected to its (fixed) surroundings by slack strings or bands, the strings or bands can be untangled after two complete turns about some fixed axis from an initial untangled state. Algebraically, the quaternion describing such a rotation changes from a scalar +1 (initially), through (scalar + pseudovector) values to scalar −1 (at one full turn), through (scalar + pseudovector) values back to scalar +1 (at two full turns). This cycle repeats every 2 turns. After 2n turns (integer n > 0), without any intermediate untangling attempts, the strings/bands can be partially untangled back to the 2(n − 1) turns state with each application of the same procedure used in untangling from 2 turns to 0 turns. Applying the same procedure n times will take a 2n-tangled object back to the untangled or 0 turn state. The untangling process also removes any rotation-generated twisting about the strings/bands themselves. Simple 3D mechanical models can be used to demonstrate these facts.

Re: Quaternions

#88

In my opinion, Geometric Algebra and bivectors ( https://bivector.net ) in particular is a much better (both practically and pedagogically) approach compared to quaternions and significantly more elegant. It's a real shame that people continue to focus so much on quaternions in this day and age.

GA is much slower in practice and takes more to store. In places speed and cache are important, quaternions are much better. Game engines don't need much if anything from GA (and I've written about using GA decades ago for software, and did it for some time, before realizing that trading that elegance for worse performance was not worth it). Here's [1] one example from the godfather of GA demonstrating how poorly GA…

[deleted]

Re: Quaternions

#89

One interesting thing about quaternions that’s almost never mentioned anywhere on the internets, there’re two conventions for them. The convention in that article is known as “Hamilton's quaternions”. There’s another incompatible one usually called “JPL quaternions”, for some American Jet Propulsion Laboratory. Authors of 99% articles about the quaternions, and software libraries implementing quaternions, are assumin…

There are actually even more. You can actually have 12 different variations depending on certain choices. Though the other sources of differences are minor.

https://arxiv.org/abs/1711.02508

This is actually a great source of frustration in the robotics state estimation community, as you have the influential University of Minnesota using JPL, and most other universities using Hamiltonian.

Post reply on HN