Andrea Hawksley, Vi Hart, Henry Segerman, Mike Stay, Sabetta Matsumoto
A project exploring non-Euclidean geometry using virtual unreality. Observe and navigate several classic hyperbolic tilings, available for webVR at h3.hypernom.com
Use the arrow keys and WASD to navigate the space, and the number keys to change tilings, or check it out using the Vive headset! (see webvr.info for how to get webVR set up for headsets.) Mobile version has orientation controls and tap to move forward.
Now on its own github page and updated the API for positional tracking. Now also with H²xE space available, and explanatory video (see section 3). And Now also with 2 technical papers with more details, on our VR versions of H³ and H²xE. There’s also an article in Nature.
1. Hyperbolic Space in VR?
Computers don’t know or care that most people live in a Euclidean world, a world where cubes fit together four around an edge because they have 90-degree angles. As long as you program in the correct math, a computer is perfectly happy simulating a hyperbolic space where cubes pack neatly 6 around an edge, for example:
Just looking at the visualization, it can be difficult to understand what the geometry is doing. But when you use VR to move around the space, you can see how the cubes appear to change as you look at them from different angles, just as cubes in Euclidean space appear differently depending on the angle you look at them from. You can also hunt down the information you want, such as looking down an edge to see that there are indeed six cubes around each edge:
This particular tiling of cubes has some interesting properties. Here’s a puzzle for you: how many cubes meet at each vertex? This question is explored in the following video of the project:
For more on the mathematics behind interesting hyperbolic tilings like this, see Henry Segerman’s paper with Roice Nelson on “Visualizing Hyperbolic Honeycombs“.
The next challenge was getting positional tracking working in a sensible way, because of course, the headset is tracked in Euclidean space and you just can’t crush hyperbolic space into a 1 to 1 mapping. The way we’re doing it now is that each frame it takes your position relative to the last, and it moves you by that same vector in Hyperbolic space (or more specifically, we move the 4D-embedded hyperbolic space in the compensating way, and then project it back down into 3D Euclidean space).
We’re still not sure how picky to get regarding completely accurate stereo vision simulation, whether that would make sense to aspire to in the first place, and whether we can do it without making it run twice as slow. And then there’s potential hand controls, where it seems the only sensible thing to do is a vector from the head position (that is, if one believes it is moral to bring Euclidean body patterns into hyperbolic space at all).
2. Hyperbolic Holiday Art
We used this technology to create The Twelve Tones of Christmas, a take on the classic holiday song but in hyperbolic space and with 12 tone music. It’s part interactive music video, part educational math visualization. It is available at playing.hypernom.com/twelve (warning: sound plays automatically, and apparently genuinely terrifies some people).
This came about because we already had a tiling of right-angle dodecahedra working in VR (which happened during a long evening of hacking with Henry Segerman and Mike Stay, inspired by Jeff Weeks’ Curved Spaces), and since I’d just recorded a 12-tone rendition of 12 days, it just made sense to make the dodecahedra have each face be one of the twelve days and then set them to turn on and off in time with the music.
Theoretically, each gift tiles out infinitely in infinitely many hyperbolic planes, and then the 12 sets of intersecting planes form the dodecahedral tiling. It’s cool how it builds up over time, and so amazing to fly around hyperbolic space in VR.
Also notice how each gift covers sets of planes where each plane is a hyperbolic plane, tiled with four right-angle-pentagons around each vertex, and checkerboarded so that every other pentagon is a mirror image.
We made the music and art public domain, and the source code is on github (badly organized into the webvr-playing-with folder for now).
Related blog post: http://elevr.com/a-virtual-holiday/
3. Now with H²xE!
We want to eventually make something more relatable to normal life, like a hyperbolic version of a house. Five square rooms around instead of four, for example. Problem with full hyperbolic space is that orientations change with respect to gravity, but you can also make a space that is hyperbolic across the horizon but Euclidean in the other direction, like a stack of hyperbolic planes. This space is called H²xE (pronounced “H2 cross E”) because it’s like a 2D hyperbolic plane (H²), times a normal Euclidean line (Hence the E, though some people say H²xR for Real number line). It also has the nice property that we can make it so the floor stays under your feet.
To do the math for H²xE in VR we recruited the help of Sabetta, a physicist who along with our usual HypVR crew managed to get it working. The space is still tiled with cube lattices and we haven’t yet added the feature where the floor stays on the floor, but now that we have the correct math working in our hyperbolic graphics shaders we know we can do the rest!
Once again, of course, it has the problem of: does it look right? Would we notice if it didn’t? Squares squish in one direction to become skinny rectangles, while when walking towards them they expand in your visual field until they are indeed squares when you’re right on one, as we’d expect. Hyperbolic tilings along one set of planes look like hyperbolic tilings, while the sets of them fade off in the distance in the Euclidean direction in a Euclidean way. At one point I changed the orientation and successfully detected a bug where the space moved differently from how it was supposed to, because the new vector-based movements don’t talk to the orientation controls, so that’s a good reality check too. I think the math and programming are both right, and I’m excited to do representative work in this space!
4. Hyperbolic Physics
Now that we’ve got a physicist on the team, we can think about how to make interactive games with a hyperbolic physics engine. We believe intuition for hyperbolic space can be increased by playing hyperbolic basketball. Work is ongoing.
References Vi Hart, Andrea Hawksley, Elisabetta A. Matsumoto, and Henry Segerman. Non-euclidean virtual reality I: explorations of H3 . In Proceedings of Bridges 2017: Mathematics, Music, Art, Architecture, Culture. Tessellations Publishing, 2017. https://arxiv.org/pdf/1702.04004.pdf  Vi Hart, Andrea Hawksley, Elisabetta A. Matsumoto, and Henry Segerman. Non-euclidean virtual reality II: explorations of H2 × E. In Proceedings of Bridges 2017: Mathematics, Music, Art, Architecture, Culture. Tessellations Publishing, 2017. https://arxiv.org/pdf/1702.04862.pdf  Vi Hart, Andrea Hawksley, Henry Segerman, and Marc ten Bosch. Hypernom: Mapping VR headset orientation to S 3 . In Douglas McKenna Kelly Delp, Craig S. Kaplan and Reza Sarhangi, editors, Proceedings of Bridges 2015: Mathematics, Music, Art, Architecture, Culture, pages 387–390, Phoenix, Arizona, 2015. Tessellations Publishing. Available online at http://archive.bridgesmathart.org/2015/bridges2015-387.html.  Vi Hart and Henry Segerman. The quaternion group as a symmetry group. In Gary Greenfield, George Hart, and Reza Sarhangi, editors, Proceedings of Bridges 2014: Mathematics, Music, Art, Architecture, Culture, pages 143–150. Tessellations Publishing, 2014. http://archive.bridgesmathart.org/2014/bridges2014-143.html.  Emil Molnar. The projective interpretation of the eight ´ 3-dimensional homogeneous geometries. Beitrage zur Algebra und Geometrie (Contributions to Algebra and Geometry), 38(2):261–288, 1997.  Roice Nelson and Henry Segerman. Visualizing hyperbolic honeycombs. arXiv:1511.02851.  Grisha Perelman. The entropy formula for the Ricci flow and its geometric applications. arXiv:0211159.  William P. Thurston. Three-Dimensional Geometry and Topology. Princeton Univ. Press, 1997.  Jeff Weeks. Curved Spaces. a flight simulator for multiconnected universes, available from http://www.geometrygames.org/CurvedSpaces/.  Jeff Weeks. Real-time rendering in curved spaces. IEEE Computer Graphics and Applications, 22(6):90–99, 2002.  Davide Castelvecchi. Mathematicians create warped worlds in virtual reality. Nature, 543 473, 23 March 2017. http://www.nature.com/news/mathematicians-create-warped-worlds-in-virtual-reality-1.21689