I want to try using heptagon-hexagon tesselation grid in hyperbolic plane like the one used in HyperRogue.

This is how I understand it:

  • First, graph representing tesselation is generated. (done)
  • Second, coordinates in hyperboloid model ($z^2=x^2+y^2+1$) are assigned to each node in graph.
  • Finally, hyperboloid model coordinates are projected to Poincare disc and rendered.

My question is how to properly compute tesselation layout in hyperboloid model.

Relying on path to origin in graph, how to find polygon location and compute its vertices coordinates on hyperboloid?

And how to translate and rotate those coordinates to implement view?

I only found angles and edge length for tesselations, but I am not sure if they are correct, or how to place them on hyperboloid, because of unusual hyperbolic geometry rules. I know nothing about hyperbolic geometry, and want to understand how tesselation in hyperboloid model is done.


I assume you have read this: http://www.roguetemple.com/z/hyper/dev.php

You say you have computed the edge length -- you could base your implementation on this, but it is easier when you compute the distance between two centers of heptagons. You should get the following result: $d=1.090550...$

The center is $h_0 = \left(\begin{array}{c}0\\0\\1\end{array}\right)$ and it is also the center of the central heptagon.

To compute the coordinate of $h$ translated by $x$ units, compute $T_xh$, where $T_d$ is the following matrix: $\left(\begin{array}{c}\cosh x&0&\sinh x\\0&1&0\\\sinh x&0&\cosh x\end{array}\right)$ (note the similarity to the rotation of the sphere). So you can compute the center of the heptagon to the right from the central heptagon by $T_dh_0$.

To find the centers of other adjacent heptagons, you just need to multiply by the rotation matrix. Rotation by $\alpha$ is just like in Euclidean geometry: $R_\alpha = \left(\begin{array}{c}\cos \alpha&\sin \alpha&0\\-\sin\alpha&\cos\alpha&0\\0&0&1\end{array}\right)$. Thus the centers of seven adjacent heptagons are $R_{k\alpha}T_dh_0$, where $\alpha = 2\pi/7$ and $k=0..6$.

To get to the center of a heptagon in distance 2, you need to: rotate by angle $\alpha k$, move by $d$, rotate by $\pi$, rotate by angle $\alpha l$, move by $d$. Thus the formula for this point is: $R_{\alpha k} T_d R_\pi R_{\alpha l} T_d h_0$ By taking $k,l=0..6$ you get all heptagons in distance at most 2, some multiple times. (Since you have the graph, I assume you know how to clean this up.) Similarly you find the centers of heptagons in large distances.

The easiest way to compute the vertices is to take the sum $s$ of Minkowski hyperboloid of the three adjacent heptagon centers, and divide it by $k$ such that $s/k$ lies on the Minkowski hyperboloid.

In general the Minkowski hyperboloid is good because the formulas for it are directly analogous to the formulas for computations on the sphere (in three-dimensional coordinates, i.e., $x,y,z$ in the $\mathbb{R}^3$), which are rather easy to find out. They just have some signs changed, and cos/sin replaced with cosh/sinh if they correspond to distances. You could think about how to implement a dodecahedron -- the formulas for spherical geometry (in x,y,z coordinates) are in most cases the same as for hyperbolic geometry (in Minkowski hyperboloid model),

  • $\begingroup$ Oh, author of HyperRogue answered, thanks for help! As I understand, this will give big heptagon tesselation. To get hexagons, big heptagon vertices directly become hexagon centers, and to get new vertices, sum and divide again, and that is it, no translation here required? I mean, sum and divide are simple addition and division as usual, with no hyperbolic functions involved? Sorry for doubting simple things, just want to be sure. $\endgroup$ Jan 14 '20 at 3:47
  • $\begingroup$ Yes, this works (other than that big heptagon vertices become small heptagon centers, not hexagon centers). Although I guess that translations will be still needed somewhere :) $\endgroup$
    – Zeno Rogue
    Jan 15 '20 at 18:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.