Skip to content

A "navigator" for exploring 2-dimensional hyperbolic space using the Poincaré disc model. The entire graph or point configuration can be translated and rotated by dragging the ambient, and individual points can be moved, too.

License

Notifications You must be signed in to change notification settings

lateral/crystal-ball

Repository files navigation

HyperNaut : a navigator for the hyperbolic plane

DOI

A "navigator" for viewing graphs (or just point configurations) in 2-dimensional hyperbolic space, using the Poincaré disc model. Edges are drawn as geodesic arcs. All computation is performed client-side, in JavaScript. Built by Benjamin Wilson at Lateral GmbH as a tool for exploring embeddings in hyperbolic space.

Uses

  • Inspecting 2-dimensional hyperbolic embeddings resulting from machine learning algorithms (this was the motivation of the author).
  • Rotating and translating point configurations for inclusions in articles and presentations (just paste your points in, transform as desired, and copy them back out again).
  • Learning about hyperbolic geometry and the Poincaré disc model.

Requirements

There are no external software dependencies. Your web browser needs to be able to render HTML5 (all modern browsers can do this) and have JavaScript enabled (it usually is, by default).

Installation

Simply download or clone the repository and open index.html in your web browser (e.g. via File > Open File ...).

Hosted version

Alternatively, a hosted version is available here.

Usage

  • The entire graph or point configuration can be translated or rotated by dragging the ambient.
  • Individual points can be moved by clicking and dragging. Movements always follow geodesic arcs (the one that is tangent to the displacement induced by the drag). Edges are attached to the points, so they follow any changes.
  • Point and edge configurations can be loaded by simply pasting them into the textareas and hitting the "update" button. Either hyperboloid or Poincaré disc coordinates can be used.

Limitations

  • As all computation is in client-side JavaScript, performance may be poor for large graphs. On a 2011 laptop running Chrome 71, performance was acceptable for a graph with 1k nodes and as many edges. To test this for yourself, see sample-data/.
  • Numerical stability is lower when points are further away from the centre of the Poincaré disc. This is because the area contained in a disc grows exponentially with the radius in the hyperbolic plane. As such it is a fundamental computational limitation, not strictly speaking a limitation of the software. This is nicely covered in [1].

Development

Tests

Unit testing is performed using QUnit and qunit-assert-close (both bundled). To run the unit tests in your browser, open run_tests.html. Opening this page runs the tests in your browser.

Contributing

Pull requests are encouraged!

Support and bug tracking

Please open an issue on the GitHub repository.

Related work

  • David Madore's fantastic hyperbolic maze, using a periodic tiling of a quotient of the hyperbolic plane. Navigation through the maze via the Poincaré disc model, uses the same mathematics.
  • The very impressive hyperbolic cellular automaton simulator has related functionality for exploring the Poincaré disc, though for quite a different purpose.
  • RogueViz is a tool for visualising and navigating data using tesselations of the hyperbolic plane, built by Dorota Celińska-Kopczyńska and Eryk Kopczyński, and used in their recent work. It uses the same engine as their amazing HyperRogue.
  • There is a video of a very impressive 3D graph explorer using the Poincaré ball, from Tamara Munzer (1998). No implementation seems to be available.
  • Related software is reported to have been developed at the University of Bielefeld, but no implementation seems to be available.

Citing HyperNaut

DOI

If you use HyperNaut in a publication, please consider citing as

Wilson, (2019). HyperNaut: a navigator for the hyperbolic plane. Journal of Open Source Software, 4(34), 1240, https://doi.org/10.21105/joss.01240

(here it is in BibTex).

References

[1] Sala, Frederic and De Sa, Chris and Gu, Albert and Re, Christopher, "Representation Tradeoffs for Hyperbolic Embeddings", Proceedings of the 35th International Conference on Machine Learning, 2018.

About

A "navigator" for exploring 2-dimensional hyperbolic space using the Poincaré disc model. The entire graph or point configuration can be translated and rotated by dragging the ambient, and individual points can be moved, too.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published