Live data from Hacker News

Rotors: A practical introduction for 3D graphics (2023)

jacquesheunis.com

11–20 of 21 posts

Re: Rotors: A practical introduction for 3D graphics (2023)

#11
post #10

If you take the Matrix logarithm of an SO(3) (3x3 rotation matrix) you get a 3-vector that represents the axis of rotation, scaled by the rotation amount (in radians). This is also a cheap operation using the inverse Rodrigues formula [1]. The 3-vector is not a bijective representation (starts repeating after length == 2*pi) but otherwise is the most elegant of them all, IMO. No need for rotors or quaternions. Plus y…

Thanks for the link to the Rodrigues form, that's quite interesting. Slightly confused by your comment though, shouldn't the matrix logarithm produce another matrix?

Re: Rotors: A practical introduction for 3D graphics (2023)

#12
post #10

If you take the Matrix logarithm of an SO(3) (3x3 rotation matrix) you get a 3-vector that represents the axis of rotation, scaled by the rotation amount (in radians). This is also a cheap operation using the inverse Rodrigues formula [1]. The 3-vector is not a bijective representation (starts repeating after length == 2*pi) but otherwise is the most elegant of them all, IMO. No need for rotors or quaternions. Plus y…

SO(3) is nonabelian, and isn't simply connected, which is why the surjective homomorphsin to SU(2) is valuable, particularly in 3D graphics.

Re: Rotors: A practical introduction for 3D graphics (2023)

#13
post #2

Saying quaternions require thinking in 4 dimensions seems like a lie with no proof. The geometric product is just the quaternion product broken up into scaler and vector parts.

It's no lie, quaternions do actually have 4 dimensions. The part I take issue with is that rotors also require 4 dimensions to represent 3d rotations, they're just labeled slightly more intuitively. quaterions: 0*1 + b*i + c*j + d*k rotors: 0*1 + b*xy + c*yz + d*zx I've included real components, but when representing rotations they'll always be zero. (They'll be non-zero during intermediate calculations though, so yo…

I'm wrong. Too late to edit, correction below:

    quaterions:
    a*1 + b*i + c*j + d*k

    rotors:
    a*1 + b*xy + c*yz + d*zx
The representations I shared previously with zero real component are for the points under rotation, not the rotors themselves which have real components in the general form. Apologies for misinformation!

The exceptions are 0 degrees and 180 degree rotations (and 360, 540, etc...), which will have one and zero as the real components, respectively.

Re: Rotors: A practical introduction for 3D graphics (2023)

#14
post #11
post #10

If you take the Matrix logarithm of an SO(3) (3x3 rotation matrix) you get a 3-vector that represents the axis of rotation, scaled by the rotation amount (in radians). This is also a cheap operation using the inverse Rodrigues formula [1]. The 3-vector is not a bijective representation (starts repeating after length == 2*pi) but otherwise is the most elegant of them all, IMO. No need for rotors or quaternions. Plus y…

Thanks for the link to the Rodrigues form, that's quite interesting. Slightly confused by your comment though, shouldn't the matrix logarithm produce another matrix?

You're correct. The logarithm produces what's essentially a cross product matrix, 0 on the diagonal and symmetric off-diagonal. The off-diag elements are the 3-vector I was talking about. Thanks for pointing that out.

Re: Rotors: A practical introduction for 3D graphics (2023)

#15
post #10

If you take the Matrix logarithm of an SO(3) (3x3 rotation matrix) you get a 3-vector that represents the axis of rotation, scaled by the rotation amount (in radians). This is also a cheap operation using the inverse Rodrigues formula [1]. The 3-vector is not a bijective representation (starts repeating after length == 2*pi) but otherwise is the most elegant of them all, IMO. No need for rotors or quaternions. Plus y…

Composing axis-angle representations gets real weird real fast. You can convert them into 9 element rotation matrices, but then you lose the benefits of storing them using only 3 elements in the first place.

Re: Rotors: A practical introduction for 3D graphics (2023)

#16
post #3

Earlier quoted context omitted.

You are right. Quaternions are a concept specific to the 3-dimensional (Euclidean) space, in the same way as "complex" numbers (for whom "binions" would be a more appropriate name) are a concept specific to the 2-dimensional (Euclidean) space. Neither quaternions nor "complex" numbers have anything to do with a 4-dimensional space of vectors. Quaternions are a field that is a subset of the 2^3 = 8-dimensional geometr…

Applications of quaternions to 3D geometry do not matter: as a field or vector space over real numbers quaternions are four dimensional because 1, i, j, k are linearly independent. Over complex numbers they are a two dimensional vector space instead.

And 3x3 matrices are 9 dimensional, yet usually you can interpret them perfectly fine with a 3d perspective. The dimension of the algebra is usually not very meaningful if you're trying to gain some intuition about it.

Re: Rotors: A practical introduction for 3D graphics (2023)

#17
post #8

Geometric Algebra supporters keep advertising that rotors are great since they work in any dimension, which makes me wonder: would an arbitrary n-dimensional SVD-like decomposition benefit from using rotors instead of rotation matrices, and if so how? And if not, why?

There are 2^n coefficients in the general GA transform (versor). One should be very, very careful dealing with GA versors of high dimensions.

Re: Rotors: A practical introduction for 3D graphics (2023)

#18
post #17
post #8

Geometric Algebra supporters keep advertising that rotors are great since they work in any dimension, which makes me wonder: would an arbitrary n-dimensional SVD-like decomposition benefit from using rotors instead of rotation matrices, and if so how? And if not, why?

There are 2^n coefficients in the general GA transform (versor). One should be very, very careful dealing with GA versors of high dimensions.

Yes, but from the canonical form of rotation matrices [1] I would expect such matrices to be represented as a sum of bi-vectors/rotors, which should take the same amount of data?

[1] https://en.wikipedia.org/wiki/Orthogonal_group#Canonical_for...

Re: Rotors: A practical introduction for 3D graphics (2023)

#19
post #2

Saying quaternions require thinking in 4 dimensions seems like a lie with no proof. The geometric product is just the quaternion product broken up into scaler and vector parts.

It's no lie, quaternions do actually have 4 dimensions. The part I take issue with is that rotors also require 4 dimensions to represent 3d rotations, they're just labeled slightly more intuitively. quaterions: 0*1 + b*i + c*j + d*k rotors: 0*1 + b*xy + c*yz + d*zx I've included real components, but when representing rotations they'll always be zero. (They'll be non-zero during intermediate calculations though, so yo…

I don't consider variables to equal dimensions so I'm glad you put them in 3D too. People take the term 'dimension' very literally when thinking about things.

What's the difference between doing:

rotors: 01 + bxy + cyz + dzx

and

quaterions: 01 + bjk + cki + d*ij

?

edit: https://api.lib.kyushu-u.ac.jp/opac_download_md/410895/178c.... this seems to explain the difference

Re: Rotors: A practical introduction for 3D graphics (2023)

#20
post #3

Earlier quoted context omitted.

You are right. Quaternions are a concept specific to the 3-dimensional (Euclidean) space, in the same way as "complex" numbers (for whom "binions" would be a more appropriate name) are a concept specific to the 2-dimensional (Euclidean) space. Neither quaternions nor "complex" numbers have anything to do with a 4-dimensional space of vectors. Quaternions are a field that is a subset of the 2^3 = 8-dimensional geometr…

Applications of quaternions to 3D geometry do not matter: as a field or vector space over real numbers quaternions are four dimensional because 1, i, j, k are linearly independent. Over complex numbers they are a two dimensional vector space instead.

Saying this is why so many people can't understand quaternions. They are not independent over multiplication. They only are over addition. With multiplication they interact with eachother, transform into eachother. Its not the same independence as a normal x,y,z,w vector. Saying they are independent just to say they are 4 dimensional misses their entire point and dooms people into thinking imagining them is impossible when its a 3D mental operation like complex numbers are a 2D mental operation.
Post reply on HN