APPENDIX: IMPLEMENTING HYPERBOLIC GEOMETRY

Return to main text


We use the Poincaré model for our underlying implementation of the hyperbolic plane, because that makes translation between the underlying representation and screen coordinates trivial. We represent a point in hyperbolic space by the corresponding point in the unit disk, which is represented by a floating point complex number of magnitude less than . Rigid transformations of the hyperbolic plane become circle preserving transformations of the unit disk.

Any such transformation can be expressed as a complex function of of the form

Where and are complex numbers, and , and is the complex conjugate of . This transformation indicates a rotation by around the origin followed by moving the origin to (and to the origin).

The composition of two transformations can be computed by:

Due to round-off error, the magnitude of the new may not be exactly . Accumulated errors in the magnitude of can lead to large errors when transforming points near the edge, so we always normalize the new to a magnitude of .

As an aside, on graphics hardware that has fast support for matrix multiplication, it might be faster to use the Klein model, as done in Gunn, 1991, because rigid transformations can then be expressed in terms of linear operations on homogeneous coordinates. Display then requires computing the Poincaré mapping of points represented in the Klein model, which is just a matter of recomputing the distance from the origin according to .