HyperRogue
Elliptic and spherical geometry
2-dimensional elliptic geometry can be interpreted as a circle with elliptic/spherical curvature, where opposite points on the circle are identical points.
The circle border is a great circle, i.e. a geodesic in this geometry.
(this is the geometry of a hemisphere)

Spherical geometry can be derived from this by adding a discrete extra dimension with values 0 and 1, and the value changes each time when passing through the circle border.
(this is the geometry of a sphere)


I noticed something similar can be done in 3 dimensions:

A) Analogously to 2-dimensional elliptic geometry, we can use a ball (instead of a circle) as a basis, assume elliptic curvature, and define opposite points on the surface of the ball as identical.
The surface of the ball lies in an elliptic plane.

B) Analogously to spherical geometry, we can use A) as a basis, and add a discrete extra dimension with values 0 and 1, and the value changes each time when passing through the surface of the ball.


Is A) elliptic space, and B) a 3-sphere? If not, what are the proper terms for A) and B)?
Originally posted by Person:
Yes, those are the correct terms.

It is worth noting that there are no orientation-reversing paths in elliptic space, unlike the elliptic plane.


You can also go in the other direction. The elliptic line (I don't know if that is a real term.) can be defined as a line segment with ends identified. Of course, this is not that interesting, as it is just a circle.


One other interesting fact:
Suppose you take the space of all possible orientations of some object, like a die. So the orientation with the 1 on top and the 2 in front is a point in this space.
This space is three dimensional, because you can tilt the die forward, tilt it sideways, or rotate it.

But what is this space? It turns out to be elliptic space!
I'm not sure I can easily explain why this is.

There is a simple VR game, Hypernom, that is based on this concept. It is played in the three-sphere, and you move by rotating your head. The goal is to go everywhere in the three-sphere, which requires rotating your head in every possible direction.
< >
Showing 1-12 of 12 comments
The author of this thread has indicated that this post answers the original topic.
Person May 14, 2018 @ 6:48am 
Yes, those are the correct terms.

It is worth noting that there are no orientation-reversing paths in elliptic space, unlike the elliptic plane.


You can also go in the other direction. The elliptic line (I don't know if that is a real term.) can be defined as a line segment with ends identified. Of course, this is not that interesting, as it is just a circle.


One other interesting fact:
Suppose you take the space of all possible orientations of some object, like a die. So the orientation with the 1 on top and the 2 in front is a point in this space.
This space is three dimensional, because you can tilt the die forward, tilt it sideways, or rotate it.

But what is this space? It turns out to be elliptic space!
I'm not sure I can easily explain why this is.

There is a simple VR game, Hypernom, that is based on this concept. It is played in the three-sphere, and you move by rotating your head. The goal is to go everywhere in the three-sphere, which requires rotating your head in every possible direction.
tricosahedron May 15, 2018 @ 7:22am 
Thanks for answering my question! :)

Originally posted by Person:
The elliptic line (I don't know if that is a real term.)
I don't know if it is correct, but I guess possible synonyms would be elliptic geodesic, or half of a great circle arc.

Originally posted by Person:
It is worth noting that there are no orientation-reversing paths in elliptic space, unlike the elliptic plane.
I didn't notice (or remember?) that the elliptic plane has orientation-reversing paths. But it can be viewed as two mirror-symmetric hemispheres that are rotated 180° against each other, and where antipodal points are identical. And because of the mirror operation, moving half of a great circle arc is the same as reversing your orientation.

Originally posted by Person:
There is a simple VR game, Hypernom, that is based on this concept. It is played in the three-sphere, and you move by rotating your head. The goal is to go everywhere in the three-sphere, which requires rotating your head in every possible direction.
Thanks, that's interesting! :)
(though I'd prefer something where you move normally)

From what I understand, a 3-sphere is the surface of a 4-dimensional orb. So I assume you're rotating the 4-dimensional orb, and what you see is the projection of its surface onto Euclidean 3-space (or rather, the 2-dimensional projection on your monitor of this), or something like this.
Person May 16, 2018 @ 7:20pm 
I mainly mentioned Hypernom as an example of the space of orientations.

If you just want an example of spherical 3-D space, see this program that I created[github.com].


Originally posted by tricosahedron:
From what I understand, a 3-sphere is the surface of a 4-dimensional orb. So I assume you're rotating the 4-dimensional orb, and what you see is the projection of its surface onto Euclidean 3-space (or rather, the 2-dimensional projection on your monitor of this), or something like this.

Yes. In fact, I find it easiest to work with points in this space as 4-vectors (x,y,z,w) where x^2 + y^2 + z^2 + w^2 = 1. Then movement and rotation are just 4-D matrix multiplications.


By the way, there are lots of cool things at hypernom.com other than the game. For example, h3.hypernom.com is a simulation of hyperbolic space that can be used on a computer or in VR.
tricosahedron May 17, 2018 @ 7:19am 
Originally posted by Person:
If you just want an example of spherical 3-D space, see this program that I created[github.com].
Thanks, that's pretty nice, and the html file can be edited. :)
(I used this to adapt movement and rotation speed, and invert the y-axis)

Originally posted by Person:
Yes. In fact, I find it easiest to work with points in this space as 4-vectors (x,y,z,w) where x^2 + y^2 + z^2 + w^2 = 1. Then movement and rotation are just 4-D matrix multiplications.
I noticed this formula can be directly related to what I described in B): Use any point within a Euclidean ball with unit radius, i.e. with x^2 + y^2 + z^2 ≤ 1. Then find all solutions for w, with x^2 + y^2 + z^2 + w^2 = 1 (usually there are exactly 2 solutions, unless w = 0).
In which of the two balls the point is depends on whether w is positive or negative. If w is 0, the point is on the surface of both balls. For spherical distances, I assume one could calculate the Euclidean 4D distance first (easy!), and then use a formula to derive the spherical distance from this value (just take 2 points on a Euclidean unit circle with the same distance between them, and calculate the length of the shortest circle arc between them).

Originally posted by Person:
By the way, there are lots of cool things at hypernom.com other than the game. For example, h3.hypernom.com is a simulation of hyperbolic space that can be used on a computer or in VR.
Yeah, I remember that app! I didn't know it's on the same site, because site navigation seems non-existent (or at least I didn't find a home page with links to the apps).

A web search helped, though: https://www.google.de/search?q=site:hypernom.com&filter=0
Last edited by tricosahedron; May 17, 2018 @ 7:31am
Person May 17, 2018 @ 1:28pm 
Originally posted by tricosahedron:
Thanks, that's pretty nice, and the html file can be edited. :)

It may or may not have been clear, but the program was written in a language called Elm, and the html file is the output of the Elm compiler. (I added a note to that effect.) So I'm curious, how hard was it to edit the compiled javascript directly?


Originally posted by tricosahedron:
(I used this to adapt movement and rotation speed, and invert the y-axis)

Yeah, it may have been silly to make the time to turn in a circle the same as the time to go around the universe!



Originally posted by tricosahedron:
I noticed this formula can be directly related to what I described in B): Use any point within a Euclidean ball with unit radius, i.e. with x^2 + y^2 + z^2 ≤ 1. Then find all solutions for w, with x^2 + y^2 + z^2 + w^2 = 1 (usually there are exactly 2 solutions, unless w = 0).
In which of the two balls the point is depends on whether w is positive or negative. If w is 0, the point is on the surface of both balls. For spherical distances, I assume one could calculate the Euclidean 4D distance first (easy!), and then use a formula to derive the spherical distance from this value (just take 2 points on a Euclidean unit circle with the same distance between them, and calculate the length of the shortest circle arc between them).

Exactly. I think the "some formula" you mention is
euclidean_distance = 2*sin(spherical_distance)



Originally posted by tricosahedron:
Yeah, I remember that app! I didn't know it's on the same site, because site navigation seems non-existent (or at least I didn't find a home page with links to the apps).

A web search helped, though: https://www.google.de/search?q=site:hypernom.com&filter=0

I couldn't find a navigation page either. I suspect it doesn't exist. :(
tricosahedron May 17, 2018 @ 3:18pm 
Originally posted by Person:
It may or may not have been clear, but the program was written in a language called Elm, and the html file is the output of the Elm compiler. (I added a note to that effect.) So I'm curious, how hard was it to edit the compiled javascript directly?
I noticed that the .elm files are source code, but I didn't know about this particular programming language.
The modifications I did to the html file were easy. I just had to search for "-0.5" to get to the part with the movement / rotation speed, and then change those values. E.g. change the value 0.5 to -2.0 in the line "return _user$project$Matrices$turnUp(0.5 * dt);", to increase the rotation speed and invert the direction when pressing 'i', and so on.
I wouldn't want to make more complex changes in this html file, though. :xmei:

Originally posted by Person:
Exactly. I think the "some formula" you mention is
euclidean_distance = 2*sin(spherical_distance)
Yep, I came to the same result. :)

I'll explore the 120-cell a bit more with your app, thanks again for the link. :)
Last edited by tricosahedron; May 17, 2018 @ 3:20pm
zeno  [developer] May 17, 2018 @ 4:58pm 
Originally posted by Person:
Yes. In fact, I find it easiest to work with points in this space as 4-vectors (x,y,z,w) where x^2 + y^2 + z^2 + w^2 = 1. Then movement and rotation are just 4-D matrix multiplications.

Yeah, models of this kind are the best to work with -- HyperRogue and HyperbolicVR use them too, except that hyperbolic spaces use w^2-x^2-y^2-z^2=1, and that HyperRogue is 2D (in 3D host space). HyperRogue represents non-Euclidean 3D spaces (crocheted plane in S3: https://www.youtube.com/watch?v=I11VBXA_UE0 ; staircase in changing curvature: https://www.youtube.com/watch?v=HZNRo6mr5pk ) in azimuthal equidistant coordinates, though, because it seemed easier to do than to generalize old code to more dimensions.
Person May 17, 2018 @ 6:41pm 
Originally posted by zeno:
(crocheted plane in S3: https://www.youtube.com/watch?v=I11VBXA_UE0

Is this just the flat torus x^2 + y^2 = z^2 + w^2 = 1/2 ?
Last edited by Person; May 17, 2018 @ 6:42pm
zeno  [developer] May 18, 2018 @ 12:30am 
No, a finite fragment of a plane -- hexagon, to be more precise.
tricosahedron May 18, 2018 @ 9:56am 
I've been exploring the structure of the 120-cell a bit:

10 cells in the same direction results in a great circle, i.e. you arrive at the same point where you left.
In a 3-sphere, moving half of a great circle always takes you to the same point, no matter in which direction you move. And the 120-cell is no different when moving 5 cells.

We can take 2 such cells that are 5 cells apart, and call them "the poles" (not sure if there's a term for it). All cells can be classified as following:
- cell type P: The poles
- cell type F: Faces both poles with a face
- cell type V: Faces both poles with a vertex
- cell type E: Faces both poles with an edge

Furthermore, they can be classified by distance from the nearest pole:
  • At distance 1 from a specific pole, there are 12 cells of type F, arranged like the pentagons on a dodecahedron.
  • At distance 2 from a specific pole, there are 20 cells of type V, and 12 cells of type F. They are arranged like the hexagons (V) and pentagons (F) on a truncated icosahedron.
  • There are 30 cells of type E at distance 3 from both poles, i.e. they lie in the same spherical "plane". They are arranged like the hexagons on a chamfered dodecahedron, with 12 pentagonal gaps where 2 cells of type F meet, each.
So we have:
- 2 poles
- 2x 12 cells at distance 1 from the nearest pole
- 2x 32 cells at distance 2 from the nearest pole
- 30 cells at distance 3 from both poles

...which makes 120 cells in total.

In case of interest, here's a list of cell type adjacency:
- neighbors of P: 12x F1
- neighbors of F1: 1x P, 5x F1, 5x V, 1x F2
- neighbors of V: 3x F1, 3x V, 3x F2, 3x E
- neighbors of F2: 1x F1, 5x V, 5x E, 1x F2'
- neighbors of E: 2x V, 2x F2, 4x E, 2x F2', 2x V'

...where F1 and F2 refers to cells of type F at distance 1 and 2 from the nearest pole, respectively, and an ' indicates that the cell is closer to a different pole than cells without an ' (except for type E).
The listed cell neighbors are sorted by distance from P (increasing from left to right).
Last edited by tricosahedron; May 18, 2018 @ 10:05am
Person May 26, 2018 @ 1:20pm 
Inspired by this thread, I made this program [github.com]. It is like the previous program I showed, but you can fly around any uniform polychoron, not just the 120-cell. I hope it's useful!
Last edited by Person; May 26, 2018 @ 1:25pm
zeno  [developer] May 26, 2018 @ 2:25pm 
Very nice! There are some interesting phenomena in spherical perspective: things close to the antipodal point, or close to you but behind you, appear to be as if they were just in front of you. However, it seems that in your simulation the sight range is limited to pi, so these phenomena cannot be observed.
< >
Showing 1-12 of 12 comments
Per page: 1530 50