[HN Gopher] Rotors: A practical introduction for 3D graphics (2023)
       ___________________________________________________________________
        
       Rotors: A practical introduction for 3D graphics (2023)
        
       Author : bladeee
       Score  : 64 points
       Date   : 2025-03-02 20:10 UTC (3 days ago)
        
 (HTM) web link (jacquesheunis.com)
 (TXT) w3m dump (jacquesheunis.com)
        
       | koolala wrote:
       | 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.
        
         | adrian_b wrote:
         | 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 geometric algebra associated with a 3-dimensional
         | space of vectors, while the "complex" numbers are a field that
         | is a subset of the 2^2 = 4-dimensional geometric algebra
         | associated with a 2-dimensional space of vectors.
         | 
         | While vectors are associated to transformations of the
         | corresponding affine space that are translations,
         | quaternions/complex numbers are associated to transformations
         | of the space that are rotations or similarities.
        
           | HelloNurse wrote:
           | 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.
        
             | adrian_b wrote:
             | An unfortunate fact in mathematics in that the term
             | "vector" is ambiguous.
             | 
             | There are vectors in the wide sense, i.e. elements of a
             | linear space. Linear spaces are a.k.a. vector spaces, where
             | "vector" is used in the wide sense.
             | 
             | Then there are vectors in the strict sense, which is the
             | sense corresponding to the etymology of the word "vector",
             | which have additional properties over the axioms of a
             | linear space.
             | 
             | Vectors in the strict sense are elements of some particular
             | linear spaces that are associated with the translations of
             | affine spaces, and which are also associated with geometric
             | algebras, where the dimensions of the geometric algebras as
             | linear spaces over the real numbers are 2^N, where N is the
             | dimension of the set of vectors as a linear space over the
             | real numbers.
             | 
             | Quaternions as a linear space over the real numbers happen
             | to be 4-dimensional, but this 4-dimensional space has no
             | relationship whatsoever with a 4-dimensional space that
             | would be an extension of the familiar 3-dimensional space
             | of the Euclidean geometry, which models the space in which
             | we live.
             | 
             | Since the quaternions are means for describing
             | transformations of the 3-dimensional space of Euclidean
             | geometry, all applications of the quaternions include the
             | 3D geometry in a more or less disguised form, in the same
             | way as any application of complex numbers includes the
             | geometry of the Euclidean plane, even if that is not
             | obvious because the applications are described in an
             | abstract way, using only the axioms of the field of
             | quaternions or of the field of complex numbers.
             | 
             | Many applications of complex numbers in electronics or
             | digital signal processing become far more easier to
             | understand when one thinks about the geometric
             | transformations of a plane that correspond to complex
             | numbers, instead of thinking only about the axioms of the
             | field of complex numbers. The same happens for quaternions.
             | 
             | The physical space in which we live and that we can
             | imagine, is modeled mathematically as an affine space, i.e.
             | as a space of points. We can also imagine affine spaces
             | with more dimensions than 3.
             | 
             | Some linear spaces are vector spaces in the strict sense,
             | being sets of the translations of an affine space. Other
             | linear spaces, like the set of quaternions, are not vector
             | spaces in the strict sense. In order to help our perception
             | of such abstract linear spaces, we may use tools like
             | graphs or drawings that map some part of the abstract
             | linear space to an affine space that we can visualize, e.g.
             | on a computer display, but we must keep in mind that this
             | is just a mapping and that the nature of that abstract
             | linear space is different from the spaces that we can see.
        
             | aap_ wrote:
             | 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.
        
         | JadeNB wrote:
         | > Saying quaternions require thinking in 4 dimensions seems
         | like a lie with no proof.
         | 
         | How could one even subject a statement like that to proof? If
         | you insist that you thought about quaternions without thinking
         | in 4D, and the author insists that you're just so used to
         | thinking in 4D that you didn't even notice it, then who's to
         | arbitrate that dispute?
         | 
         | (I'm sensitive to these issues because I'm a mathematician of
         | the "visualizing 4D is just visualizing n dimensions and
         | setting n = 4" variety, so I have no idea when I'm particularly
         | thinking in 4, or any other specific number, of dimensions
         | ....)
        
         | ColinHayhurst wrote:
         | > The geometric product is just the quaternion product broken
         | up into scaler and vector parts.
         | 
         | The geometric product works in any dimensions. They have a
         | clear geometric intepretation. Rotations and translations can
         | done using the same algebraic operations.
        
         | itishappy wrote:
         | 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 you need to consider
         | them!)
         | 
         | Now... rotors do have some unique powers in that they're
         | incredibly general. You don't need to hop from complex numbers
         | to quaternions when you move between spaces and beyond, you can
         | just use rotors for everything:                   2d:
         | complex numbers         rotors              3d:
         | quaternions         rotors              4d:         octonions
         | rotors              Minkowski spacetime:         ???
         | rotors
        
           | itishappy wrote:
           | 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.
        
       | chombier wrote:
       | 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?
        
       | rsp1984 wrote:
       | 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 you can simply
       | use Rodrigues to get a rotation matrix back.
       | 
       | [1] https://en.wikipedia.org/wiki/Rodrigues%27_rotation_formula
        
         | mecsred wrote:
         | 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?
        
           | rsp1984 wrote:
           | 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.
        
         | nyrikki wrote:
         | SO(3) is nonabelian, and isn't simply connected, which is why
         | the surjective homomorphsin to SU(2) is valuable, particularly
         | in 3D graphics.
        
         | itishappy wrote:
         | 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.
        
       ___________________________________________________________________
       (page generated 2025-03-05 23:01 UTC)