Live data from Hacker News

Quaternions

liorsinai.github.io

1–10 of 118 posts

Re: Quaternions

#3
I've been teaching myself geometric algebra which is apparently isomorphic to quaternion algebra. Some people prefer GA for 3D modeling work.

Re: Quaternions

#4
I've been out of the games sphere for a long time, but is slerp() really the default idiomatic interpolation approach in modern games nowadays?

There are a vanishingly small number of scenarios where lerp() + normalize() doesn't work perfectly well enough and it is drastically faster and SIMD-friendly. That used to be the case at least.

Re: Quaternions

#5
3B1B is also informative, especially in explaining why C was not extended using triplets but 4-tuples were needed: https://youtu.be/d4EgbgTm0Bg.

Here’s a Math SE answer on why: https://math.stackexchange.com/questions/1784166/why-are-the..., here’s a more ELI5 discussion: https://www.reddit.com/r/math/comments/9urjyx/why_there_is_n.... I especially like this very intuitive comment in that thread : https://www.reddit.com/r/math/comments/9urjyx/comment/e96j4l...

Left as an exercise to reader: prove that no such n-tuples exist for n>4.

Re: Quaternions

#7
post #3

I've been teaching myself geometric algebra which is apparently isomorphic to quaternion algebra. Some people prefer GA for 3D modeling work.

Computing in higher dimensions is nice, although pretty difficult to implement efficiently. Hence, Quaternions are mostly used nowadays, I think.

Re: Quaternions

#8
tldr: Simply explained without demonstrations: Quaternions are hypercomplex numbers of the form

w + xi + yj + zk

Where w, x, y, and z are real and i^2 = j^2 = k^2 = -1 and ij = k, ji = -k, jk = i, kj = -i, ki = j, ik = -j.

Being u = (x, y, z) = xi + yj + zk a unitary vector, it is possible rotate any vector q by an angle theta around u by doing:

pqp'

where p = cos(theta/2) + sin(theta/2)u and p' = cos(theta/2) - sin(theta/2)u .

Re: Quaternions

#9
Smallest of small notes: in TeX, "cos" is rendered as a product of 3 italicised variables c, o and s, whereas the escaped literal "\cos" is rendered as the cosine function.

Re: Quaternions

#10
> although a lecturer once eluded to them during a class in my masters

Would be more amusing if "they eluded a lecturer" or "a lecturer once elided them".

("alluded to them").

Post reply on HN