2

I just found A Universal Model for Hyperbolic, Euclidean and Spherical Geometries, after reading the HyperRogue game dev notes where it said the hyperboloid model (aka the Minkowski model) was the best general representation to transform between different projections in the hyperbolic space (i.e. to render in the different hyperbolic models). The first link talks about gyrovectors and mobius transforms, the other doesn't. I have a book coming on gyrovectors, I don't know much about them yet.

What I'm wondering is what should be the general model for a programming framework to render in the 3 geometries (spherical, euclidean, hyperbolic), and all of the hyperbolic models. Should I be focusing on the hyperboloid model limited to the hyperbolic space, or is this new universal model something which could serve as a simplified central standard programming model to render in all the model of all 3 spaces? Or is there something else?

Lance
  • 3,698
  • I don't know if if it is worth the value to enter into versors, etc. There exists already classical connections between the 3 geometries with curvatures $-1,0,1$, for example as illustrated here with different types of projection. – Jean Marie Jan 24 '23 at 10:22
  • @JeanMarie can you explain in more depth these classical connections between the 3 geometries? – Lance Jan 24 '23 at 11:12
  • 1
    I must find back a pertinent explanation I have somewhere in my personal documentation involving the 3 surfaces $x^2+y^2-z^2=c$ (where $c$ is the curvature :$1,0,-1$ accounting for the different geometries. These surfaces being a hyperboloid with two sheets included into a cone included into a hyperboloid with one sheet. – Jean Marie Jan 24 '23 at 11:36

1 Answers1

4

hyperboloid model limited to the hyperbolic space

Maybe the name "hyperboloid model" is limited to the hyperbolic space, but the computations are not. In HyperRogue, a common implementation is used, which resolves to the hyperboloid model for hyperbolic space, sphere model for spherical space, and homogeneous coordinates for the Euclidean space. You generally simply have to:

  • change the definition of the inner product of the embedding space (Euclidean for S, Minkowski for H)
  • use the relevant $\sin_\kappa$ and $\cos_\kappa$ functions (same as defined in the "universal model" paper)
  • multiply by $\kappa$ in some places
  • and that's all! Otherwise, (almost) everything will be the same. (HyperRogue uses only $\kappa\in\{-1,0,1\}$ and other values of curvature are obtaining by scale, but the system should work with arbitrary values too.)

The writeup (already linked in our dev notes) could be helpful.

This also generalizes the standard techniques used for 3D graphics (homogeneous coordinates for points, rotations and translations represented as matrices). I am not sure whether this universal model has a standard name, let's call it the universal homogeneous model.

As far as I can tell, the "universal model" paper gives only one advantage of the universal stereographic approach over the universal homogeneous model, that is, being more intuitive. Maybe it is more intuitive for some people, but I disagree with this. More specifically:

  • I have seen many newbies to hyperbolic rendering start their work using the Poincaré model and not knowing how to do things in it, and then switching to the hyperboloid model and having less problems in it.
  • Using a symbol $\oplus$ for an operation that is not commutative is bad. Maybe $a \oplus b$ looks simpler than $T_a(b)$, but the later notation makes the meaning clearer.
  • As mentioned in the dev notes, formulas for spherical geometry are generally quite intuitive (if you know linear algebra). Their hyperbolic analogs can be easily found by analogy (assuming good understanding of Minkowski geometry).

Some other important points:

  • Stereographic model is claimed to be more numerically precise than hyperboloid. See e.g. the paper "The Achilles' Heel of 0(3,1)?" by Floyd, Weber and Weeks. In my experience, it depends on what you are doing with it, and if precision is a problem, you should be used another representation anyway.
  • The universal homogeneous model extends naturally to maximally symmetric spacetimes (Minkowski, de Sitter and anti-de Sitter), and also (a bit less naturally) Thurston geometries.
  • If you need ultra-ideal points for something, homogeneous coordinates let you represent them somewhat naturally -- they are simply the points outside of the disk. This is not the case in Poincaré model, where the points outside of the disk are simply inversion images of the points inside.
  • Regarding transforming between projections -- IMO this does not really matter much as you will be doing computations in your chosen model, and only the projection function will be affected. Obviously for Poincaré/stereographic the universal stereographic will be easier. Possibly also for other conformal projections. For others projections, I would say that universal homogeneous is generally more intuitive.
Zeno Rogue
  • 1,359
  • So which one are you recommending to go with? The universal homogeneous model or hyperboloid/minkowski model? Also, in your codebase, where exactly is this {-1, 0, 1} abstraction implemented? – Lance Jan 24 '23 at 17:26
  • Opened a chat, perhaps I could ask you a few more questions! https://chat.stackexchange.com/rooms/142303/hyperbolic-projections – Lance Jan 24 '23 at 17:30
  • Minkowski hyperboloid is a special case of universal homogeneous (for hyperbolic geometry), I think you want to support all three, so use universal homogeneous. Functions sin_auto and cos_auto are responsible for curvature-adjusted sin and cos functions. The 'sig' table is responsible for the inner product. – Zeno Rogue Jan 24 '23 at 18:18
  • 1
    @ZenoRogue - You use $3\times3$ matrices to represent transformations of the hyperbolic plane. Wouldn't it be more efficient to represent them as even-grade multivectors in the Clifford algebra (equivalent to split-quaternions)? These have only $4$ components, while matrices have $9$ components. And it's easier to normalize a multivector than a matrix. Composition of transformations is also cheaper: Multiplying two multivectors requires $16$ real-number multiplications, or $8$, depending on the basis used, while multiplying two matrices requires $27$ real-number multiplications. – mr_e_man Jan 24 '23 at 21:26
  • 1
    On the other hand, application of a transformation is not cheaper: Multiplying a vector with a multivector in the "sandwich product" requires $24$ real-number multiplications, while multiplying a vector by a matrix requires $9$ real-number multiplications. – mr_e_man Jan 24 '23 at 21:27
  • 1
    @mr_e_man I have thought about that before, and I agree it seems to be a good system indeed (although I do not know any project using it). Other than the advantages you have mentioned, there is also a numerical precision advantage (split quaternions combine the advantages of both hyperboloid and Poincaré model). I generally prefer matrices for their simplicity and generality though :) – Zeno Rogue Jan 25 '23 at 18:26
  • Multivectors are also general, but they're just impractical for high dimensions. An even multivector has $2^{n-1}$ components, while a matrix has $n^2$ components. And both of them are hard to normalize (or, not so easy as split-quaternions). – mr_e_man Jan 25 '23 at 19:35
  • I've wondered about representing transformations as sequences of reflections, using the Cartan-Dieudonne theorem to keep the length of the sequence at $n$ or $n-1$, so the number of components is about $n^2$. I don't know how efficient this is, regarding composition of two transformations, but normalization is not necessary. To apply one transformation, apparently it requires about $2n^2$ real-number multiplications. – mr_e_man Jan 25 '23 at 19:48