Experiments with geometry
Work in progress -- more pictures and references to be added.
HyperRogue was originally designed as a game played on the bitruncated order-3 heptagonal tiling of the hyperbolic plane. This tiling has very interesting properties for gameplay --
it is infinite (in fact, exponentially infinite, more infinite than anything Euclidean), and the existence of heptagons allows the player to use tactics to save themselves from the
nasty monsters; the effects of hyperbolic geometry that can be witnessed in HyperRogue have been described in
this article.
Now, HyperRogue allows allows a wide selection of different tilings in the "experiment with geometry" menu. All the features of HyperRogue work in all the geometries (as long as this
makes sense) -- thus, you can just admire the tilings, or you can play the game, draw (using the texture mode), or view it in many
projections. This article
describes the geometries and tessellations currently available in HyperRogue.
Icy Land, Great Wall, and the Alchemist Lab in the standard geometry, aka GP(1,1) {7,3} |
We will start with dissecting the geometry of the standard HyperRogue map. We start with the order-3 heptagonal tiling of the hyperbolic plane, represented by the
Schläfli symbol {7,3}. This tiling is represented by the thin cyan lines in the picture above.
However, the heptagonal tiles are quite large -- not many of them fit on the screen. So we apply the process of
bitruncation:
we add a new tile at every vertex.
In general, the two-dimensional tilings in HyperRogue can be described by three elements:
- The underlying regular tessellation, i.e., the numbers $\{p,q\}$ in the Schläfli symbol.
- The operation performed on the regular tessellation.
- Wrapping. This step is not performed in the standard HyperRogue map.
There are also some tilings which do not conform to this classification. We will explain them, and three-dimensional honeycombs, later.
Regular tessellations
In a regular tessellation represented by the Schläfli symbol $\{p,q\}$, each tile is a regular $p$-gon, and $q$ tiles meet in each vertex.
The internal angles of a regular Euclidean $p$-gon has 180 - 360/p degrees, thus, in Euclidean tessellations we have 180 - 360/p = 360/q. We have three
Euclidean tessellations: {3,6}, {4,4}, and {6,3}. A spherical $p$-gon has bigger internal angles than the corresponding Euclidean one, and a hyperbolic
$p$-gon has smaller angles, thus hyperbolic tessellations have larger $p$, while spherical ones have smaller $p$.
HyperRogue currently supports:
- Euclidean tessellations {6,3} (the hex grid, called just "Euclidean") and {4,4} (the square grid).
- hyperbolic tessellations {7,3}, {8,3} ("octagons"), {5,4} ("four pentagons"), {6,4} ("four hexagons"), {7,4} ("four heptagons").
- spherical tessellations {5,3} (HyperRogue calls it just "spherical" -- probably should be called "dodecahedron"), {4,3} ("cube"), {3,3} ("tetrahedron").
What about the icosahedron, tetrahedron, triangular grid, and hyperbolic tessellations such as {4,5} or {3,7}? These are available as duals -- described in the next section.
Operators
The following operators are available:
- Do nothing. Take the $\{p,q\}$ tessellation as is.
- Bitruncation. Add a new tile centered at every vertex. This is called $bitruncation$ because it corresponds to cutting off the vertices of a
polyhedron. This new tile is adjacent to $q$ tiles from the original tessellation, and $q$ tiles obtained by truncating the adjacent vertices.
Thus, we have $p$-gonal tiles adjacent to $p$ 2$q$-gonal ones, and 2$q$-gonal tiles which are adjacent to $q$ $p$-gonal tiles
and $q$ 2$q$-gonal ones; these two alternate.
- Goldberg-Coxeter construction. For order-3 tessellations (i.e., $q$=3), this generalizes bitruncation by adding more hexagons. $GP(x,y)$ means that, to get to a nearest
original vertex from any original vertex, you should move $x$ cells, turn 60 degrees, and move $y$ cells. Bitruncation corresponds to GP(1,1), and identity corresponds to GP(1,0).
The operation $GP(2,0)$ is called chamfering.
- Dual. We replace the vertices of the original tiling with tiles, and the tiles with vertices. Thus, for example, a $\{p,q\}$ tiling becomes a $\{q,p\}$ one.
- Rectification. This is similar to bitruncation, but we cut off less: the tiles obtained from truncating the vertices are not adjacent, but they meet in a vertex.
- Goldberg-Coxeter construction is also available for order-4 tessellations, but it is different: we add squares rather than hexagons. This no longer generalizes bitruncation --
GP(1,1) corresponds to rectification, and GP(2,0) is called expansion.
HyperRogue allows bitruncation of every regular tessellation, and Goldberg-Coxeter construction for any regular tessellation such that $q$=3,4 (see "variations" in the "Experiments with
geometry" menu). Dual and rectified tilings can
be obtained from bitruncated tilings by restricting the movement somewhat; this is done in the
Crystal World and
Warped Coast/Sea lands respectively. Some more cool facts:
- These operators can be composed. For example, we can start with some order-3 tessellation $x$, perform the $GP(a,b)$, and then perform $GP(a',b')$, and get a $GP(a',b')$ $GP(a,b)$ $x$.
This is the same as $GP(a'',b'')$ $x$; the relationship between $(a,b)$, $(a',b')$ and $(a'',b'')$ is the multiplication of the
Eisenstein integers (though $(a,b)$ corresponds to $a+b\epsilon_6i$, not $a+b\epsilon_3i$ as used in Wikipedia).
For example, bitruncated bitruncated is $GP(3,0)$. (For order-4 tessellations, use Gaussian integers instead.)
Various lands in GP(2,1) {8,3}. Note the Crystal World, Warped Coast and "un-bitruncation" in the bottom row. |
- Crystal World and Warped Coast/Sea are a bit more general -- they work not only on bitruncated tilings, but on anything that can be colored like a football.
The Warped Coast restricts movement between white tiles, while the Crystal World lets the white tiles grow. $\{p,3\}$ can be colored like a football whenever $p$ is even; The result of
$GP(a,b)$ on $x$ is football-colorable iff $x$ is football-colorable itself, or $a-b$ is divisible by 3 (which means that our $GP(a,b)$ operator can be seen as a composition of bitruncation
and another Goldberg-Coxeter operator).
For example, {8,3} is bitruncated {8,4}. You can enable Crystal World or Warped Coast in {8,3}, to obtain {4,8} or rectified {8,4}, respectively. You want to see the dual of the
standard HyperRogue tiling? Just do GP(3,0) on the heptagonal tiling, and play Crystal World there! This is because crystal bitruncated equals dual, so we have:
crystal GP(3,0) {7,3} = crystal bitruncated bitruncated {7,3} = dual bitruncated {7,3}.
Wrapping
The Desert in GP(1,1) {4,4}, or the bitruncated square grid. Torus, 4x4. |
The simplest wrapped space is the flat torus. Take a rectangular sheet of paper, for example a square with edges of length 1. Glue the left and right edges, you get a cylinder. Glue the top and bottom edges, you get a torus (better to do this
with a rubber rather than paper). HyperRogue does not normally display the obtained "donut" (though such a display is available in the "Hypersian rug" mode), but rather simulates the way
this surface is interpreted by the beings who live inside it. If you are inside a torus, you will see yourself 1 unit to the north, 1 unit to the east, etc. -- you will see an image of yourself
in every grid point! This is pictured above.
We say that the torus is a
quotient space of the Euclidean plane -- it is obtained by identifying points $(x,y)$ and $(x',y')$ such that $x-x'$ and $y-y'$ are both integers.
On the other hand, the perspective interpretion given above shows that the original Euclidean plane is the
universal cover of the torus (covering spaces could be said to be the
opposite of quotient spaces -- we unwrap a wrapped space by creating copies).
The following quotient spaces are currently available in HyperRogue:
HyperRogue being used to play Projex -- a variant of Hex in the elliptic plane GP(2,2) {5,3} tiling of the elliptic plane, shown in the stereographic projection.
The blue circle (better visible in the zoomed in version) is the equator -- every point on this circle is actually the same point as the opposite point on the circle, and the inside is the same as outside. |
- In spherical geometry, we can identify each point with its antipodal point, obtaining the elliptic plane. This is available in HyperRogue as "elliptic" (here we start with a
dodecahedron), or "elliptic/cube" (here we start with a cube). Interestingly, the elliptic plane is non-orientable: if you are right-handed, you will see a left-handed version of yourself
on the other pole.
- Algebraically, a torus can be viewed as a finite Abelian group with two generators ("go one cell north", "go one cell east"); some of such groups actually need two generators,
but it is also possible that the torus is wrapped a bit unevenly -- in this case, we can "go one cell north" by going $d$ steps east. HyperRogue lets us to play on both kinds of tori.
The Icy Lands in the 9x6 hex tiling on the Klein bottle. Floor tiles do not match nicely because the Klein bottle is not orientable. |
- Torus can be obtained from a cylinder by gluing the top and bottom edges, but we can also do something a bit more weirder -- reverse the circle on the way, thus obtaining a
non-orientable surface known as the Klein bottle. (This cannot be immersed in three-dimensional Euclidean space without crossing itself.)
- If we glue only one pair of edges of a rectangular sheet of paper, we get a cylinder or a Möbius band (depending on whether we have added a twist). HyperRogue includes only
complete manifolds, which do not end abruptly. However, we can also get an infinite cylinder, or an infinite Möbius band, by making our initial sheet of paper infinitely wide.
Contrary to most quotient spaces available in HyperRogue, these spaces are unbounded, which lets us play HyperRogue with rules designed for unbounded worlds (including multiple lands
if Chaos Mode or a Crossroads variant land is selected). There is a risk that an impassable wall is generated, though. All the tori, Klein bottles, cylinders, and Möbius bands
are available in HyperRogue as "torus/Klein bottle", and then a specific way of wrapping can be selected in "advanced parameters".
Zebra in the standard HyperRogue map -- it looks mostly the same in the Zebra Quotient, but you see copies of the player (and other elements) everywhere... |
- The land Zebra and several other lands are based on a periodic pattern; if we identify the cells which correspond to each other in this periodic pattern, we get a quotient space
which has 12 heptagons. We call this the Zebra quotient.
The Docks in the Bolza surface
- Well-known hyperbolic quotient spaces include Klein Quartic, Bolza Surface,
Macbeath surface, Bring's surface, and Schmutz's M(3) and M(4)
(mentioned in Wikipedia articles about Klein Quartic and Bring's surface, respectively). All of them are highly symmetric: if by "location" we mean a cell (in the regular tiling, i.e.,
not bitruncated) and a direction on this cell, then, for each pair of locations $(l_1, l_2)$, there is an isometry which takes $l_1$ to $l_2$. For the tilings based on {7,3}, this gives
the greatest number of isometries possible for a surface of a given genus by Hurwitz's Theorem. Despite having less symmetries than Klein Quartic and Bring's surface, respectively, Schmutz's surfaces have a larger systole,
which intuitively means that the shape is closer to a circle. The Klein Quartic is made of 24 heptagons (it has a group structure), and the Bolza Surface has 6 octagons and more
symmetries than the Zebra quotient. When implementing the Bolza surface, I have first implemented its double cover (with 12 octagons), so this double cover is available in HyperRogue too.
Bring's Surface, based on {5,4}, has its group of isometries isomorphic to the group of permutations of 5 elements, and Schmutz's surfaces are based on the {12,3} tiling.
The minimal quotient |
- An interesting question is, what number of heptagons (or octagons) in a quotient space are possible (assuming 3 meet in a vertex)? This question can be solved elegantly using the
Euler characteristic $\chi = V + F - E$. Here, $F$ is the number of heptagons, $V$ is the number of vertices ($V=7/3 F$),
$E$ is the number of edges ($E=7/2 F$). Thus, the Euler characteristic is $\chi = 7/3 F + F - 7/2 F = -F/6$, and we see that the number of heptagons must be divisible by 6 (we could see
this without using the Euler characteristic, but still). Now, the Euler characteristic of a genus $g$ surface (a "torus with $g$ holes") is $2-2g$. Thus, the number of heptagons in an
orientable surface must be divisible by 12 (an octagon corresponds to 2 heptagons, so the number of octagons must be divisible by 6). Zebra Quotient and Bolza Surface are genus 2 surfaces,
while the Klein Quotient is a genus 3 surface. DivisionByZero has found a way to create a non-orientable surface with just 6 heptagons;
this is available as the "minimal quotient".
- David Madore uses another hyperbolic quotient space in his hyperbolic maze. HyperRogue uses a similar method in
its "Field Quotient" space. This geometry is obtained by finding two 3x3 matrices P (step forward and turn back) and R (rotate 360/7 degrees) over a finite field such that
PRPRPR=PP=RRRRRRR=Id, and generating all the possible products of these two generators; each orbit of form {W,WR,WR^2,...,WR^6} becomes a single cell, and the elements correspond to possible
facing directions on that cell. Only fields of order $p$ (a prime) or $p^2$ are considered. This construction
generates Hurwitz surfaces; in particular, for $p=13$ we get one of the surfaces in the first Hurwitz triplet, with systole 5.9039.
By default $p=43$ is used, but we can play with something different by changing "advanced parameters"; it is also possible to make this construction not based on the {7,3} regular tiling,
but one of the other regular tilings (we still get highly symmetric surfaces, but with less isometries per genus than Hurwitz surfaces).
- Just as we have unbounded quotient spaces of the Euclidean plane (infinite cylinder and infinite Möbius band, we can also have unbounded quotient spaces of the hyperbolic plane.
One fun example is called "dimensional crystal" in HyperRogue. Imagine a very simple crystal (say, salt) in 3 dimensions: atoms form a
three-dimensional grid, and each atom connects to 6 other atoms. It is possible to make a quotient space of the {6,4} hyperbolic tiling in such a way that the connections between cells
are exactly the same as in this crystal; when we flesh out the skeleton to include the whole hexagons, this creates a surface similar to Schwarz P.
Moreover, the same constructions works in any number of dimensions -- so you can basically play HyperRogue in, say, four dimensions (still viewed as if it was a hyperbolic plane)! When viewed "from the inside", the surface will look just like the {2d,4} hyperbolic tiling (well, there is one catch --
the metric is a bit different), but since the light rays (sticking to the surface) can fall into a loop and hit you back, you will see images of yourself in a distance (as usual in quotient
spaces). HyperRogue also
supports "half dimensions" by making the last dimension contain only two levels. Since these quotient spaces are unbounded, a multi-land game, or Camelot, can be played in them. Some interactive
online visualizations:
Irregular tilings
You can also play on (order-3) irregular grids. These are generated with the following algorithm: (see
this visualization, which presents some of the steps nicely)
- Choose a sphere or a hyperbolic quotient space, with a ${p,q}$ tiling. It has $n$ tiles. (Torus theoretically works too, but it is not implemented yet.)
- Choose $dn$ random points, using Mitchell's best candidate algorithm. These will be the "centers" of cells.
- Apply Voronoi tessellation to make "tiles" around each point.
- Compute the length of the median edge $m$, and see if there are any edges shorter than $sm$ (by default $s=0.2$). If yes, move every center to the average of the vertices of its cell,
and go back to the last point. This process should make the resulting more tame.
- HyperRogue currently supports only cells with at most 8 neighbors. If there are any cells with more than 8 neighbors, their centers are replaced with new points, and we go back to the third step.
- Optionally, we bitruncate the obtained grid. Bitruncation makes the grid a bit more regular, but just enough to make many features of HyperRogue work much better than on completely
irregular grids. This includes the Warped Coast (rectification) or the Graveyard/Crystal World (dual), nicer versions of tilings in other lands, better Krakens, Rock Snakes, and Raiders.
- For technical reasons, we require that two adjacent subcells have to be centered on adjacent cells of the original tiling -- if not, we start again.
Irregular grids can be chosen in the "variations" submenu in the "Experiments with geometry" menu. You need to choose the base geometry first -- if a non-quotient hyperbolic surface is
chosen, the construction is performed on a quotient space, and then unraveled to the hyperbolic plane. (Thus, whether you choose {7,3} or {8,3}, matters only for
the "unit" of the density $d$, the quotient space (Bolza or Klein Quartic) which gives the period, and some minor technicalities.)
Binary tiling
The binary tiling is geometrically a bit less regular that other tilings available in HyperRogue, but it is more natural from the point of view of a computer scientist, as
it has a very simple structure of the infinite binary tree. This tree has no root -- every vertex has a parent. The set of all tiles at the given level forms a
horocycle. HyperRogue uses a slightly shifted variant of the usual binary tree, where every cell has one child "on its own", one child with its left sibling,
and one child with its right sibling. Being based on horocycles, this tiling is great for lands such as Ivory Tower, Whirlpool, and Temple of Cthulhu. Poincaré half-plane projection of each
tile is similar to a rectangle of size width x 1, where the parameter "width" can be adjusted. By default, width is 1, which makes the tiles square. Since 11.1d the standard binary
tiling is available too.
Archimedean tilings
Bull Dash in the Marek-snub tiling (3HL,6,6,6)(1,0)[2](3) |
Vineyard in (6,6,3L,3L,3L) (0 2)(1)(3)(4) |
Rose Garden in (4,6,14) |
Icy Land in (2,2,2,2,2,2) |
These are tilings where all the faces are regular polygons, and the world looks the same from every vertex. There are
3 regular and 8 semiregular Euclidean tilings,
5 Platonic and
13 Archimedean (spherical) solids,
and infinitely many prisms,
antiprisms,
hosohedra,
dihedra,
and hyperbolic tessellations. (HyperRogue has its limits though, so only finitely many are supported.)
The tiling can be given in the format inspired by
Don Hatch's hyperbolic applet. The first part gives the number of sides of
each face which meets in a vertex. Let
n be the number of these faces. The edges are numbered 0 (the edge before the first face), 1 (the edge between the first and the second face),
up to
n-1. After this, you specify how two adjacent vertices will be connected. (i,j) means that edge i matches edge j of the adjacent vertex, which is oriented in the same way.
[i,j] means that edge i matches edge j of the adjacent vertex, which is oriented in the opposite way. (i) is the same as (i,i), and [i] is the same as [i,i]. For each undefined edge,
[i] is used. You can also specify ^k after each face (repeat this face
k times), or after the whole face definition (repeat the whole sequence
k times, this also repeats
the connections). You can add special characters after face definitions: H (marks it a "heptagon" for the game rules -- relevant in some lands), L (draw lines on these tiles when generating
Vineyard, Zebra, and Land of Power), l (like L but only on the mirrored tiles).
Generalization: k-isohedral tessellations
We can generalize Archimedean tilings even further: consider tessellations whose tiles fall into a finite number of types, and such that every pair of tiles of the same type leads to
an isometry of the whole tessellation (this property is called $k$-
isohedral, where $k$ is the number of types). Such tessellations can be defined in tes files and explored in HyperRogue.
See
this catalog of several thousands of Euclidean, hyperbolic, spherical and affine tessellations, compiled by Marek Čtrnáct. (In affine tessellations we use affine
transformations instead of isometries.)
Penrose tilings
Penrose tilings are named after Roger Penrose, who investigated them in the 1970s. HyperRogue currently implements the
kite-and-dart tiling; other Penrose tilings have similar properties:
- they exhibit pentagonal symmetry,
- the tiles are aperiodic, meaning that it is impossible to arrange them so that they exhibit perfect translational symmetry.
Both properties are not typical to well-known tilings of the Euclidean plane. In all the Euclidean tilings so far, the tiles were arranged periodically, and it is
impossible for a tiling based on a periodic grid to exhibit pentagonal symmetry.
These properties are less special from the point of view of beings in the hyperbolic space -- many tilings exhibit pentagonal symmetry, and one of the easiest hyperbolic tilings,
the (standard) binary tiling, is also aperiodic: when we view the tile as a tree, each tile is either a "left child" or "right child" of its parent tile, that parent is again either
a "left child" or "right child", and so on, and the "family histories" of two tiles are never, or almost never, the same. The construction of the kite-and-dart tiling is actually
similar to that of the binary tiling. It is obtained by starting from a simple arrangement (e.g., five kites around a vertex) and then replacing kites and darts with smaller kites
and darts (this process is neatly described
here). This construction also can be reversed: if we tile the plane with
kites and darts (by factor φ = 1.618...), they can be "deflated" in an unique way into larger kites and darts. Every tile will have a different history of where its ancestor from
k deflations appears in its
k+1th ancestor, making the tiling aperiodic.
Three-dimensional geometries
Much of the things explained so far generalize naturally into three dimensions. Three-dimensional Euclidean, spherical, and hyperbolic space are, well, similar to their two-dimensional
variants, but in three dimensions. The 3D equivalent of a
horocycle is a horosphere, whose intrinsic geometry is Euclidean;
intrinsic geometry of equidistant surfaces (which are equidistant to a plane) is hyperbolic. Three-dimensional tilings are usually called
honeycombs.
- Regular tilings are described by the Schläfli symbol $\{p,q,r\}$, which means that each face is a $p$-gon, there are $q$ faces around each vertex of a three-dimensional cell,
and $r$ cells around each edge of the honeycomb. For example, the basic tiling of the Euclidean space with cubes has Schläfli symbol {4,3,4}. This is the only regular honeycomb in the
Euclidean space. Note that both $\{p,q\}$ (which describes the shape of a cell) and $\{q,r\}$ (which decribes the vertex figure) must be tessellations of the sphere. This gives us
just six choices for regular honeycombs in three-dimensional spherical geometry, which corresponds to four-dimensional Platonic solids: {3,3,3} (5-cell), {3,3,4} (16-cell), {3,4,3} (24-cell), {5,3,3} (120-cell) and {3,3,5} (600-cell).
We also have four regular honeycombs in three-dimensional hyperbolic geometry: {5,3,4}, {4,3,5}, {5,3,5}, and {3,5,3}. If we ignore the requirement for $\{p,q\}$ and $\{q,r\}$ to be
tessellations of the sphere, we get more (infinitely many) hyperbolic honeycombs, but their faces will be apeirohedra arranged on horospheres (if $\{p,q\}$ Euclidean) or equidistant surfaces $\{p,q\}$
hyperbolic), and their vertices will be ideal (if $\{q,r\}$ Euclidean) or ultraideal (if $\{q,r\}$ hyperbolic). HyperRogue currently features the Euclidean cubic honeycomb, all the spherical
honeycombs, and the {5,3,4} and {4,3,5} hyperbolic honeycombs.
- Some of the operations to do on regular tilings generalize to three dimensions, although this is not currently done in HyperRogue
(see Wikipedia) for some examples).
HyperRogue currently features only two additional Euclidean honeycombs:
bitruncated cubic honeycomb and the
rhombic dodecahedral honeycomb.
- Wrapping also works. We can construct three-dimensional elliptic space, which is orientable, contrary to two-dimensional elliptic space (elliptic spaces are orientable in
odd dimensions and non-orientable in even dimensions); this is not compatible with the 5-cell, but it does with the other regular spherical honeycombs. We can construct three-dimensional tori by taking a $x \times y \times z$ cuboid, and gluing its left face to its right face,
front face to its bottom face, and top face to its bottom face. The Klein bottle generalizes too, but there are more possibilities: when gluing the top face to the bottom face,
we could take the mirror image (in, say, the X axis), or we could rotate it by 180 degrees (obtaining the orientable half-turn space), or by 90 degrees (obtaining the orientable
quarter-turn space). (If we start with a hexagonal prism, we also get "sixth-turn" and "third-turn" spaces, but these are not currently available in HyperRogue.)
In hyperbolic geometry, the "field quotient" method also generalizes; we can obtain a hyperbolic manifold constructed of 260 dodecahedra (based on {5,3,4})
or its dual made of 650 cubes (based on {4,3,5}), available in HyperRogue.
- The binary tiling also generalizes to three dimensions. The easiest 3D variant of the binary tiling is to tile a horosphere (whose intrinsic geometry is Euclidean) with
squares (the {4,4} tiling). Four of such squares (A, B, C, D) will make a larger square, which corresponds to a square of the same size (E) on a concentric horosphere in distance log(2) towards the
ideal center. By making cells with 9 faces (A, B, C, D, E, and the four "vertical" faces) we get a hyperbolic honeycomb, pictured here.
A similar construction works with other tessellations of the plane, assuming that we find a way to connect such a tessellation to a scaled version of the same tessellation. This works
with the {3,6} tessellation (four small triangles on the bottom horosphere, one big triangle on the big horosphere, and three vertical faces), with the {6,3} tessellation (the distance
between horospheres being log($\sqrt(3)$) -- this construction is more complicated, with 14 faces) and even with the
kite-and-dart tiling (deflation is also a form of scaling).
Non-isotropic 3D geometries
So far we have been using the word "geometry" rather informally; formally, a "geometry" can be understood as a simple connected space which is
homogeneous, that is, looks exactly the same at each point.
Thus, there are three 2D geometries (spherical, Euclidean, hyperbolic) which are all not only homogeneous, but also
isotropic, i.e., the space also looks exactly the same in each
direction. In 3D, we have the same three isotropic geometries, but without the isotropy requirement, we get more. In particular, we get the famous eight Thurston geometries, called so
after the
Thurston's geometrization conjecture (which generalizes the famous Poincaré conjecture, and has been proven
in 2003 by Grigori Perelman, who famously rejected both the $1000000 prize and the Fields Medal for this). These are:
$\mathbb{E}^3,\ \mathbb{H}^3,\ \mathbb{S}^3$
These are the three isotropic geometries (Euclidean, hyperbolic, spherical) we already know.
$\mathbb{H}^2\times\mathbb{E}$
Probably the simplest non-isotropic geometry, obtained by stacking hyperbolic planes in an Euclidean way. In HyperRogue, you can perform $\times\mathbb{E}$ on any 2D hyperbolic tiling.
See
this short video.
$\mathbb{S}^2\times\mathbb{E}$
Likewise, but we stack spherical planes in an Euclidean way. Surface of a spherinder.
While conceptually a bit easier than $\mathbb{H}^2\times\mathbb{E}$, in practice it looks much weirder and more interesting -- this is because the same object will be seen in multiple
directions! These multiple images correspond to going around the sphere multiple times. So a small object (say, a small triangle) may look like a whole row of triangles, or like a row
of concentric rings (if it is in the antipodal point), or like a triangle below you plus concentric rings (if it is below you). Or you could get crescent shapes if it is close to the
antipodal point/below you. Obviously, when you do "current geometry x $\mathbb{E}$" on a 2D spherical tiling in HyperRogue, you get this geometry.
Solv, aka Sol or Solve
This geometry has interesting features not exhibited by any 2D geometry, and is much weirder than all the geometries we have seen so far. It is also
quite impressive visually. (It is kind of sad that the more interesting geometries have such boring names.)
Imagine a plane, tessellate it with squares, and put a 1x1 cubes on each square. Then, put a 2x2 cube on each four cubes on the first level, a 4x4 cube on each four cubes on the second level, and so on.
Also do the same in the direction below the plane (0.5x0.5 cubes, and so on). Consider this a map in $\mathbb{R}^3$ of a manifold, where the size of the cube corresponds to the metric
(our model distorts the distances, all the cubes are actually the same size in the actual manifold) --
so, for example, we can get from the cube (0,0,0) to (1024,0,0) in just 21 steps (move 10 cubes upwards, one cube to the right (which corresponds to 1024 steps on the 0 level),
and 10 cubes downwards). We already know this manifold -- this is the hyperbolic geometry $\mathbb{H}^3$, viewed in the Poincaré half-space model, with its "{4,4} on horospheres" honeycomb,
already described.
To obtain the Solv geometry, we also start with 1x1 cubes arranged in a plane, but on top of these 1x1 cubes, we put (1/2)x2 cuboids instead. On top of them, we put (1/4)x4 cuboids, and so on.
For example, We can reach the cube at (1024,1024,0) from (0,0,0) in just 42 steps -- first, we go 10 levels upwards (in the Z direction), make one step in the Y direction, and 10 levels downwards.
We are now in (0,1024,0). Now, go 10 levels downwards (as previously, we stack 2x(1/2) cuboids on the level below the original one, and so on), make one step in the X direction,
and 10 levels upwards.
The Solv geometry has metric $ds^2 = (e^zdx)^2 + (e^{-z}dy)^2 + dz^2$, which is the continuous version of the description above; the construction above is a tessellation of it (a Solv
analog of the binary tiling). While the model described above is (relatively) easy to understand, our view from inside the space would be actually way more complicated. According to
the
Fermat's principle, the light rays always take a path between two points which is the shortest route (geodesic) between
them. So if you are standing in the point (0,0,0), you will see the point (1024,1024,0) roughly above you -- the light ray will take the route being the continuous analog of to the 42-step
route described in the last paragraph. You will also see the same point (1024,1024,0) roughly below you -- the light ray could also work on the X direction first. And you will see it
diagonally too -- the path from (0,0,0) to (1024,1024,0) is not the shortest, but it is also a geodesic (i.e., it is locally the shortest). And you will see it some other locations -- there
are more geodesics. The picture above presents the cubes at level 0 viewed in the Euclidean and Solv metric; in both spaces we are looking in the same (diagonal) direction, and the structure is
colored in the same way. As we can see, the "diagonal direction" seems to twist helically, and when we look upwards (or downwards), the light rays go back to our structure.
See
SolvView by MagmaMcFry to fly through this space.
In HyperRogue (since 11.1d) the Solv geometry (and similarly the other non-isotropic geometries) can be rendered both in the orthogonal/
perspective of the simple model described above, and in the
native geodesic perspective (the "donuts" here are spaces of constant Z, and the camera is rotating).
You can also choose whether the objects should move along the actual geodesics, or along the straight lines from the model.
Nil, aka twisted Euclidean
You know this puzzle about a bear who moved 1 km north, 1 km west, 1 km south, and it ended where it started? This was possible because of the spherical geometry of Earth.
Many geometries can be explained in a similar way. We have six directions: north and south, west and east, up and down. Just as on Earth, these directions do not necessarily go in
straight lines, they simply correspond to our coordinate system. In the twisted Euclidean space, if you go 1 unit to the north, 1 unit to the west, 1 unit to the south, and 1 unit to
the east, you end up 1 unit above where you started (we could write this rule as NWES=U); also the NSEW directions all commute with up and down, which means that NU=UN and WU=UW.
(In Euclidean NU=UN, WU=UW, NW=WN; in $\mathbb{H}^3$ we have NU=UNN, WU=UWW, NW=WN; in $\mathbb{H}^2\times\mathbb{E}$ we have NU=UNN, WU=UW, NW=WN; in Solv we have NU=UNN, WWU=UW, NW=WN.)
In general, when we make a series of movements in the NESW directions which would make a loop in the Euclidean plane, that same series of movements in Nil makes us end up directly
above or below the starting point, in distance proportional to the (signed) area of the Euclidean loop (the sign depends on whether we go clockwise or counterclockwise).
Here is an animation in Nil (newer versions use another honeycomb which is symmetric and easier to understand).
Nil geometry allows us to naturally embed impossible structures such as the Penrose triangle or the Penrose staircase. Here are some animations in Nil:
Penrose triangle,
Penrose triangle chainmail,
Penrose triangle network,
driving on an impossible ring.
$\widetilde{SL(2,\mathbb{R})}$, read "the universal cover of $SL(2,\mathbb{R})$", or twisted $\mathbb{H}^2\times\mathbb{E}$
(OK, this name is even worse than Solv or Nil.)
This combines the ideas of Nil and $\mathbb{H}^2\times\mathbb{E}$. It is like $\mathbb{H}^2\times\mathbb{E}$, but where a loop in $\mathbb{H}^2$ makes us end up directly above or below the
starting point, proportionally to the area of the hyperbolic loop. Note that, in hyperbolic geometry, if you make a loop, you end up rotated by an angle proportional to the area of the
loop (see Orb of the Sword). Therefore, this geometry is similar to the space of orientation-preserving isometries of the hyperbolic plane. It is not exactly the same space though:
the space of isometries is called $PSL(2,\mathbb{R})$, and you naturally get the same isometry after rotating 360 degrees, or making a loop of area $2\pi$. In the universal cover of
$PSL(2,\mathbb{R})$, that would be different points.
One might wonder whether we get a new geometry when that construction is applied to $\mathbb{S}^2$? Well, the space of rotations of a sphere (called $SO(3)$) is the same space as
the elliptic 3-space $P\mathbb{S}^3$; many graphics engines use this fact by representing the rotations as unit quaternions (note that $q$ and $-q$ represent the same rotation). So the space of
rotations in hyperbolic/spherical geometry is $PSL(2,\mathbb{R})$ / $P\mathbb{S}^3$, its double cover is $SL(2,\mathbb{R})$ / $\mathbb{S}^3$; $\mathbb{S}^3$ is simply connected, but
$SL(2,\mathbb{R})$ is not.
HyperRogue does not implement this geometry in its universal cover form, but it does implement its $PSL(2,\mathbb{R})$ quotient as the "space of rotations". The space of rotations is available
for both spherical and hyperbolic geometries (see
this animation).
Conclusion
See also
this thread which shows snowballs randomly distributed in various geometries.
The technical aspects of our implementation are explained
here.
As far as we know, SolvView and HyperRogue seem to be the first interactive geodesic visualizations of the Solv and Nil spaces.
In the 2006 paper "Real-Time Animation in Hyperbolic, Spherical and Product Geometries", Jeff Weeks presents his visualizations of the isotropic
and
product spaces and plans to work on the remaining geometries; the $\mathbb{H}^2\times \mathbb{R}$
is also available in
hyperbolic VR.
In 2015
Pierre Berger
has made static pictures of seven of the eight Thurston geometries (although it is not clear to me what structures are shown in the picture).
Thanks to MagmaMcFry for SolvView (by the way, SolvView also visualizes the twisted hyperbolic geometry) and for pointing me towards the paper
Frenet Formulas and Geodesics in Sol Geometry by
Attila Bölcskei and Brigitta Szilágyi, which explains the Solv geometry and its geodesics nicely.
The paper
Visualization of Nil-geometry; Modelling Nil-geometry in Euclidean space with software presentation by Dávid Papp and Emil Molnár has been very helpful
while programming Nil, while
Geodesics and geodesic spheres in $\widetilde{SL(2,\mathbb{R})}$ geometry by
Blaženka Divjak, Zlatko Erjavec, Barnabás Szabolcs and Brigitta Szilágyi has been very helpful while programming $\widetilde{SL(2,\mathbb{R})}$.
Statistics
HyperRogue gives some statistics about the current geometry, which needs some explanation.
- faces per vertex lists faces which meet in each vertex. In case if the vertices are different, possible choices are given in brackets. In some cases exponents are used to
denote the number of faces which meet in the vertex, instead of repetition.
- size of the world is the total number of tiles in the map, in case if this number is finite. For the Euclidean plane, the number is infinite, so it is given simply as ∞.
For hyperbolic tilings, the number is given in the form k exp(∞), where exp(∞) signifies that the map grows exponentially, and k is the number of tiles in area 4π. This is the area of
the sphere (thus allowing us to easily compare the density of spherical and hyperbolic tesselations), and also the area of the Zebra Quotient and the Bolza surface. Klein Quartic has
area 8π, minimal quotient has area 2π, tractricoid has area 2π (if you take one half, 4π if you take both), and an ideal hyperbolic triangle has area π.
Binary tiling displays weird numbers, because the area of a tile is width/(2√2 ln(2)).
- full angle in the Archimedean tilings is the sum of angles around a vertex if the faces were regular Euclidean polygons. This equals 360° for Euclidean tilings,
is less than 360° in spherical tilings, and greater than 360° in hyperbolic tilings. This can be used to compute the number of vertices in area a, using the formula
aK / (2π - full angle), where K is the curvature (1 for sphere and -1 for hyperbolic plane); thus, for spherical tilings, the total number of vertices is given by
720° / (360° - full angle).
How does this affect gameplay and land generation?
HyperRogue is designed for its standard geometry. Playing in other geometries lets us discover the gameplay effects of these geometries. The Steam version of HyperRogue has the
Strange Challenge, which lets you to compare your HyperRogue skills in a randomly chosen geometry to other players!
- On an empty hex grid, if two monsters are next to you, they will stay next to you forever (or, more realistically, until a third monster come from the other side). The main
tactical innovation of HyperRogue is that it has heptagons, which let you escape in such situations. Disabling bitruncation makes it easier to escape (every cell is a heptagon), while
the Goldberg-Coxeter construction makes the heptagons a precious tactical resource -- in some cases, two or three monsters can force you on a path which will never have any heptagons!
This does not happen in the standard grid, thus the game on Goldberg geometries is harder.
- The hyperbolic plane is exponentially infinite; the game rules had to be adjusted for finite worlds, such as tori, the sphere, and the hyperbolic quotients. Interestingly, we find
the hyperbolic quotients the most playable of them. Even though the world is finite, it is still hyperbolic, so you can escape!
- Periodic patterns tend to work only in the specific underlying regular tesselation. Zebra pattern, Palace pattern, the Vineyard pattern, and the Field pattern do not have direct
analogs in non-{7,3} geometries; also they do not work in most quotient geometries, as the period of the space is not a multiple of the period of the pattern. Obvious exceptions -- the Zebra
pattern works great in the Zebra Quotient, and the Field Pattern works great in the Field quotient. There are also patterns which work in other geometries but not in {7,3} --
$\{p,3\}$ where $p$ is even is three-colorable which lets us to play the Snake Nest, and {8,3} (including the Bolza surface) has a nice periodic pattern which is used in the Docks.
- Great Walls are currently implemented only in the bitruncated and non-bitruncated {7,3}, and Euclidean (well, and spherical geometries). Crossroads IV-like Great Walls are implemented in
all infinite hyperbolic worlds, although they are somewhat buggy.
- Hedgehog Warriors cannot be killed in geometries which are not order-3.
- Irregular grids tend to have cells with 4 to 8 adjacent cells. The irregular grid could be interpreted as a manifold with variable curvature: 4,5-cells are spherical, 6-cells are
Euclidean, and 7,8-cells are hyperbolic. This is visible in gameplay (you need to plan your moves in order to use the hyperbolic cells strategically), and make the straight lines
(such as ones found in Crossroads IV or Warped Coast) look very weird.