@ Zeno Rogue Games @ Vapors of Insanity @ Necklace of the Eye @ Hydra Slayer @ [ HyperRogue ] @ Untahris @
@ About @ Downloads @ Gallery of Lands @ FAQ @ [ Models ] @ Geometries @ Curves @ Programming @ RogueViz @ Images & Videos @ History & Naming & Credits @ press @
 

Models and projections of hyperbolic geometry

Maps aim to represent the surface of Earth on a flat piece of paper. It is impossible to do this in such a way that all the distances are preserved. Maps can be are conformal (preserve angles) or equal-area (keep the area proportions), but not both. There are many known projections (e.g., Mercator, stereographic), all of which have their advantages and disadvantages.

The situation with the hyperbolic plane is similar. The Poincaré model used by default in HyperRogue is just one of the possible projections, which does not tell the truth -- objects very close in the model might actually be very far away from each other. There are many two-dimensional and three-dimensional projections, and they all have their advantages and disadvantages.

Some authors use the word "model" instead of projection. A projection is a way to present the non-Euclidean surface (usually on a flat surface), while a "model" is a way to respresent the geometry mathematically. All the commonly used models of hyperbolic geometry work by representing the hyperbolic points as points in a subset of an Euclidean plane, and thus they are projections (maybe except the hyperboloid model, which uses $\mathbb{R}^3$ and still needs to be projected to a flat screen); not all projections are useful as models though, so we use the word "model" for projections which are useful as models, or for historical reasons.

HyperRogue aims to include all the interesting projections of hyperbolic geometry. This not only includes viewing, but you can also play the game in each model, draw (using the texture mode), change the geometry, look for spherical and Euclidean counterparts, and more!

This article presents the pictures of projections. They can be obtained in HyperRogue with menu -> settings -> projections ('vsp' on the keyboard). most of these also work in the online version of HyperRogue.

Minkowski hyperboloid



hyperboloid.png
Hunting Grounds


If the surface of a sphere in $\mathbb{R}^3$ is the 'true form' of spherical geometry, then the Minkowski hyperboloid is the 'true form' of hyperbolic geometry. However, the Minkowski hyperboloid lives in the Minkowski space, based on the so-called Minkowski metric $|(x,y,z)| = x^2+y^2-z^2$. This means that this model should be treated with caution: if points on the hyperbolic plane are in distance $d$ to each other, they will be in distance $d$ to each other on the Minkowski hyperboloid, but only according to the Minkowski metric -- according to the usual metric, they can be very distant even if $d$ is small!
While the Minkowski metric may be a bit hard to visualize, it is not a problem for mathematical formulas. The Minkowski hyperboloid can be rotated with Minkowski rotation matrices just like a sphere can be rotated with normal rotation matrices. This makes this model great for computations, and this is why the Minkowski hyperboloid is internally used by HyperRogue for its computations. In the projection menu, the Minkowski Hyperboloid is available with 'projection types -> Minkowski hyperboloid', you will probably want to rotate it with 'camera rotation'. It is also available in the Hypersian Rug mode ('Hypersian rug mode -> smooth surfaces') -- this uses a different rendering method with advantages and disadvantages, and allows for more camera freedom. (Online model -- use arrow keys to rotate, Page Up/Down to zoom)

Disk models



ms-escher3.png
Escher/3D
(Poincaré)
klein.png
Crossroads III
(Klein-Beltrami)
klein.png
Red Rock Valley
(Gans)
klein.png
Crossroads
(Inverted Poincaré)


Common disk models can be obtained from the Minkowski hyperboloid via a perspective projection. Basically, look at the Minkowski hyperboloid from the point $(0,0,-z)$. We get the Beltrami-Klein model for $z=0$, the famous Poincaré disk model for $z=1$. We can also get the Gans model by orthogonal projection (which corresponds to $z=\infty$), and inverted Poincaré model for $z=-1$. Beltrami-Klein model maps straight lines to straight lines, while the Poincaré model is conformal. HyperRogue uses the Poincaré model by default. The Minkowski hyperboloid picture above shows how the Poincaré model is obtained by looking at the hyperboloid from the point (0,0,-1) (the bottom point of the picture).

These projections are all in 'projection type -> disk/Gans', 'projection distance' lets you select $z$.

Poincaré half-plane model

halfplane.png
Yendorian Forest

Poincaré half-plane model is one of the basic conformal models that are taught in hyperbolic geometry courses. Since it uses the whole (infinite) half-plane, it is not well suited for playing HyperRogue. However, there is a nice use for it in the lands with large circles, equidistants, or horocycles (in general, a specific direction), such as the Temple of Cthulhu -- use 'vdard' to rotate the model so that the horocycles become horizontal lines. In the Ivory Tower, the lower half-plane model ('vda1l') works better, as it makes the equidistants almost horizontal, and the gravity points downwards.

The 'half-plane scale' setting controls the positioning of the current view center.

Hemisphere model

hemisphere.png
Zebra

This conformal 3D model is obtained from the Poincaré half-plane model by inversion. Also, Klein-Beltrami model can be obtained from the hemisphere model by projecting it on the plane (of course we can also obtain hemisphere from Klein-Beltrami in the opposite way). See this video by Henry Segerman and Saul Schleimer for lots of fun with this model. (Online model -- use arrow keys to rotate, Page Up/Down to zoom)

Band model


Band model is a less known conformal projection of hyperbolic plane. It is the hyperbolic analog of the Mercator projection of the sphere. A certain straight line H in HyperRogue's world is taken, and that line is mapped isometrically to an Euclidean straight line E, while places further and further from H are conformally mapped into smaller and smaller places, so we obtain a band in the end. The band model can be obtained by taking the complex logarithm of the half-plane model.

This projection really shines with the line animation in the history mode ('vdaae'). In the line animation, H is taken to be the line connecting the starting and ending point of your travel, and the animation is basically moving the band horizontally. Interestingly, unless you return to a place you have been before, most of the path your character takes can be approximated by a straight line in the hyperbolic plane. Thus, the line animation will show your whole game of HyperRogue, except when you return to a place you have been before and wander in another direction -- this typically happens during the Yendor quest, and also in the gravity lands or the Haunted Woods. Since this could be used to cheat, the line animation is available only during the GAME OVER screen, or the cheat mode. HyperRogue can be also configured to render bands automatically when the game ends or the Orb of Safety is used -- see the 'history mode'.

You can watch the moving band on the screen, but you can also render the whole band to an image file. Here are some bands obtained in this way: Chaos mode (a vertical HTML file) , going through three Camelots (a large PNG file).

Spiral

spiral-windy.png
Windy Plains
spiral-whirlpool.png
Whirlpool
spiral-zbera.png
Zebra
Rotate and scale the band so that the length of its intersections with vertical lines is $2\pi$, and apply the (complex) exponent function to it. We obtain a beautiful spiral. This is of course a conformal model too. The spiral is rendered on screen automatically when the band is rendered to a file (either manually or automatically). The spiral is animated -- it can be rotated, or saved to a file.

You can also select the spiral from the models menu. Remember to configure the sight range to automatically generate the visible area. There is also an Euclidean version, which works best in torus geometries.

Polygonal model

square.png
Vineyard
tehora-star.png
Emerald Mines
By Riemann's mapping theorem it is possible to conformally map the Poincaré disk model (and thus the hyperbolic plane) to any shape. These mappings are described by analytic functions in the complex plane; however, the actual formulas might be not obvious. The polygonal model supports mapping to regular polygons, and regular stars. This is done by calculating the coefficients of the Taylor series of the analytic function (we know which point is to be mapped to the center of the edge and which point is to be mapped to the vertex, and that the points in between are mapped to a line segment -- finding the coefficients then boils down to solving a system of equations) -- we don't exactly get a polygonal boundary in this way, but the approximation should be good enough to render the visible part of the world quite well. Press 'n' (or Shift+n) to change the degree of the approximating polynomial. According to this discussion and this paper, a perfect square could be obtained by applying the Jacobi elliptic functions; this is not implemented in HyperRogue yet. Note how all the straight lines (vines) in the Vineyard picture above end orthogonal to the boundary. The corners of the star look curved because of inaccuracies in the polygonal approximation, and also because the points that would be mapped here are very distant from the player. Also remember to take "high quality screenshots" (F6 in the map editor/vector graphics editor mode).

Joukowsky and friends

azeq.png
Alchemist Lab
(Joukowsky projection)
azeqa.png
Ruined City
(Joukowsky projection+inversion)
cyl-equidist.png
Rose Garden / Crossroads III+Dry Forest
(transition to Joukowsky projection+inversion, t=0.75)
cyl-equiarea.png
Crossroads II
(squared half-plane)

The Joukowsky transform is a transform used in airfoil design. As recently noticed by Roice Nelson, this transform is also very interesting as a projection of the hyperbolic plane.

This transform maps the complex number $z$ to $\frac{z+(1/z)}{2}$. It is easy to see that it maps the unit circle to the interval $I=[-1,1]$; both the outside and the inside of the unit circle are mapped bijectively to $\mathbb{C} -I$. Therefore, if we apply this transform to the Poincaré disk (or the inverted Poincaré disk), we get a conformal projection of the hyperbolic plane which covers the whole plane except a slit ($I$).

This projection is not very convenient for playing HyperRogue, as the slit appears in the center (and the player appears in the infinity by default). However, we can compose with Möbius transformations to move the slit into another place. When we compose with inversion, the central point of the Poincaré disk is mapped to the center, and the slit becomes the real axis except (-1,1). This has an interesting effect when we rotate the reference axis. It is also possible to make the slit end at 0 and $\infty$; the same projection can be obtained by taking the square of the (right) half-plane model. This projection can be obtained in HyperRogue by selecting the "band model" and changing the transition parameter to $t=-1$; in general, this applies the function $(z^u-(1/2)^u)/u$ to the right half-plane, where $u=1-t$. (We get the band model in the limit for u=0.)

It is easy to create a transition from the inverted Poincaré model to the Joukowsky projection, i.e., a projection parametrized by $t$ which equals the inverted Poincaré for $t=0$ and Joukowsky for $t=1$. This transition is given by the following linear combination: $\frac{(1-(t/2))z+(t/2)(1/z)}{2}$; for intermediate values, the hole becomes an ellipse. We can also compose this with inversion, thus producing a transition from the Poincaré model to the inversion of Joukowsky model. Shapes of the intermediate steps are inversions of ellipses, which are very similar to unions of two circles. This is a very nice presentation of the fact heavily used in the world design of HyperRogue: while each side of a Great Wall is a hyperbolic half-plane, if we get far enough from the great wall, it feels as if this was almost the whole hyperbolic plane. Animation of the t parameter here. I have found that this model has been previously discussed in [1] (called the dual focus projection).

Formula

HyperRogue 10.4z allows you to transform the current model with a given complex function. Unless you use a non-analytic function (e.g., conj, re, im), this results in a conformal model. More buggy and slower than pre-made projections, but good for prototyping.

Projections inspired by cartography

azeq.png
Graveyard
(azimuthal equidistant)
azeqa.png
Crystal World
(azimuthal equal-area)
cyl-equidist.png
Docks
(cylindrical equidistant)
cyl-equiarea.png
Warped Coast
(cylindrical equal-area)
sinusoidal.png
Dry Forest
(hyperbolic sinusoidal)
twopoint.png
Living Cave
(two-point equidistant)

Cartographers have created many spherical projections to map the surface of Earth. Many of these have natural hyperbolic counterparts. In general, most projections are defined by choosing two properties (e.g., azimuthal/cylindrical + conformal/equidistant/equal-area; OR conformal + shape; OR pseudocylindrical + shape; or two-point equidistant). This is not surprising -- one property fixes every point on a curve, and the second property fixes it exactly. Other combinations may yield interesting results too. For example, "two-point azimuthal" (which faithfully represents the directions from the two chosen points) is a simulation of how an Euclidean being transported to a hyperbolic world would perceive it via their binocular vision; this turns out to be a vertically stretched Klein model (it is easy to see that such a model is indeed azimuthal in two points). A hybrid one-point-equidistant-one-point-azimuthal model looks rather weird.

See this video for the hyperbolic analogs of more projections inspired by cartography.

Hypersian Rug and the paper model


Palace
       model/modelphoto.jpg
Desert
(paper model)
The paper model ('special modes -> creative -> paper creator') produces an image that can be printed and stapled to make a nice paper model of the hyperbolic plane, a bit similar to hyperbolic crocheting. The Hypersian Rug mode (in the projections menu) simulates the process of hyperbolic crocheting. This model is not based on a fixed formula, its folds are determined randomly. While chaotic, these models manage to get the distances, angles, and areas in our 3D space right, so they give good intuition of the hyperbolic geometry. (Online model -- use arrow keys to rotate, Page Up/Down to zoom)

Poincaré Ball model

ballmodel.png
Volcanic Wasteland
The world of HyperRogue is supposed to be three-dimensional. The ground level is actually an equidistant surface, 1 unit below a plane. The camera is positioned 1 unit above this plane -- it turns out that what it sees is exactly the Poincaré model. Klein model is obtained by positioning the camera on the plane. The Poincaré ball model is a 3D analog of the Poincaré disk model; it can be used to investigate this three-dimensional interpretation. The 3D settings ('settings -> 3D configuration') can change the exact values of the parameters. (Click the picture above for a larger image -- it is hard to see the lines on the small one.)

Surfaces of constant curvature




Yendorian Forest (tractricoid) and the Lost Mountain (Dini's surface)

Reptiles (hyperboloid-like) and Galápagos/Windy Plains (Kuen surface)


There are several known smooth surfaces of constant negative curvature (-1). Since the curvature of hyperbolic plane is also constant negative, these surfaces are great to draw hyperbolic tesselations on (projections -> 'hypersian rug mode -> smooth surfaces'). Such drawings will keep distances, angles, and areas right. While they look great, only a small part of the hyperbolic plane can be visibly represented in this way, so they are not good for playing HyperRogue; however, the coverage extends far away in specific directions, so first increasing sight range ('settings -> other -> sight range') and texture size in hypersian rug settings may improve the effect.

Many popular texts use a one-sheet hyperboloid for explaining the basic ideas of hyperbolic geometry, but this is not accurate -- the one-sheet hyperboloid does not have constant curvature. The "hyperboloid-like" surface is a similar surface which does have constant negative curvature. It is a known surface, but it does not seem to have a specific name (some references: StackExchange, Virtual Math Museum, Alfred Gray's Modern Differential Geometry of Curves and Surfaces with Mathematica).

You can play with these models in the online version of HyperRogue: hyperboloid-like, Kuen surface, tractricoid, Dini's surface. These models take some time to load and compute. Use arrow keys to rotate, Page Up/Down to zoom.

Fisheye

fisheye.png
Icy Land
Some people playing HyperRogue do not understand that the underlying geometry is non-Euclidean, and instead they assume that it simply uses some kind of a fisheye view. The picture above shows the Euclidean version of the Icy Land in the fisheye projection discussed here, obtained by projecting the plane to the hemisphere via the inverse of gnomonic projection, and then projecting the hemisphere orthogonally to the disk. This is visibly different than the Poincaré model. Such model could be used to represent the whole plane in a disk, but it does not work that well for that purpose because of the heavy distortions.

More features

Acknowledgments and extra references

Thanks to tehora for showing me Bulatov's presentation, from where I have learned about the band model, and about other possible conformal mappings. The star and the spiral are for her :) We got the idea of the spiral mapping from this art by Ross Hilbert; see also the Euclidean version explained here. I wanted to draw the HyperRogue world in a square form after seeing Escher's Square Limit, although a closer inspection reveals that this woodcut is not actually uniform (contrary to his Circle Limit, which are the Poincaré disk model). Thanks to Fulgur14 for pointing me to the square mapping discussion, and to simon_clarkstone for suggestions about automatic band writing. Azimuthal equidistant and Lambert azimuthal equal-area models are based on this video by David Madore. Thanks to Wilemien for his idea of doing the hyperboloid-like surface of constant curvature.

[1] John Lamping, Ramana Rao. The Hyperbolic Browser: A Focus 1 Context Technique for Visualizing Large Hierarchies. Journal of Visual Languages and Computing (1996) 7, 33–55
@ Donate @ Project Blog @ Twitter @ Discord @ Discuss @


Tweet                  

Thanks to Slashie for hosting this at RogueTemple!
@ Zeno Rogue Games @ Vapors of Insanity @ Necklace of the Eye @ Hydra Slayer @ [ HyperRogue ] @ Untahris @
@ About @ Downloads @ Gallery of Lands @ FAQ @ [ Models ] @ Geometries @ Curves @ Programming @ RogueViz @ Images & Videos @ History & Naming & Credits @ press @