Planes, Spheres and Pseudospheres
gregegan.net
gregegan.net
(The original page has been taken down due to bandwidth usage.)
His blog articles often go over my head and I admit that I usually understand only the first ~30-50%, after which I give up.
I love how his stories grow in scope (one discovery plausibly leads to another and eventually interdimensional travel). I know Adrian Tchaikovsky is a popular recommendation around here (especially Children of Time and rightfully so), but I'm looking for something with less drama / less character-driven. The 3 body problem is a good example.
Also tangential but I recommend trying Last and First Idol for anyone looking for ridiculous, gory, self-consistent sci-fi.
[0] http://qntm.org
Blindsight by Peter Watts is also fantastic, same grade as Egan IMO.
Some of his stories are available online for free here: https://www.freesfonline.net/authors/Ted_Chiang.html
His short story "The Story of Your Life" was adapted into the 2016 movie "Arrival".
The idea is to select a given latitude on Earth, and then imagine a cone that "just fits" that latitude, in the sense that it is tangent to the earth all the way around at that latitude. Draw a line all the way around the cone at the given latitude. Then imagine using a pair of scissors to cut the cone vertically up to its apex, and flattening it out to make a circle that is missing a pie slice.
A single full rotation of the earth would be equivalent to "driving a car" from one edge of the pie slice all the way around the latitude line to the other edge of the pie slice. At the end of the trip, the car will be pointing in a different direction from the one it started, for every latitude except the poles and the equator.
The angular rotation of the car from the start to the end of its trip is the amount a Foucault pendulum would rotate in 24 celestial hours at a given latitude on Earth.
For rectangles (or rhombuses), many languages already give you 2D arrays with a dense representation; several other mappings are possible and sometimes useful (e.g. the Hilbert Curve [1], but that needs a loop; interleaving might not need a loop in some contexts). For infinite extensions thereof it's not too hard to come up with a mapping, though practically you'll have to switch to block allocation. Wrapping in a single dimension makes a cylinder (without ends), but note that wrapping in both dimensions is topologically a torus but has significant stretching.
For triangles, you can just take the triangular number of one coordinate, then add the other, using the sum as the linear index. But in most practical cases where triangles show up, you can use 2 triangles together to make a rectangle (in many use cases, one axis will be a unit longer than the other).
For other finite fragments of a plane you're probably best off breaking it into triangles and squares, or even wasting memory. There are no good solutions for a real circle in particular.
For a sphere, pick your favorite platonic solid with triangular/square faces. The icosahedron minimizes stretching at the cost of having 20 poles (note that this involves 5 "strips" of 4 triangles each). The tetrahedron minimizes poles at the cost of severe stretching. The cube and octahedron compromise on both. Some non-platonic solids are technically possible but I've never found a reason (particularly, using the truncated icosahedron directly does not decrease stretching compared to the icosahedron).
Note that the dodecahedron does not have a reasonable solution; it's not possible to tile its faces so I'm not sure why anyone would care though.
For a torus (without stretching; topology isn't sufficient) it's possible to do similarly to the sphere. The easiest way to visualize is 8 cubes forming a hollow square; 2 faces of each cube are not exposed. Approaches using triangles (possibly via hexagons - remember a triangular prism-like can't be properly tiled by regular triangles) are probably possible but that's too much work; this post already took long enough.
The triangular pyramid is just the tetrahedron again if including the bottom; you have to use the more-complicated indexing if you have an odd number of triangles. The square pyramid is also possible, with or without the bottom. The pentagonal pyramid without the bottom is possible with the more-complicating indexing. Higher pyramids are likely to imply stretch so aren't worth considering.
For hyperbolic geometry, all implementations I'm aware of use per-node allocations, ick. It's probably possible to switch to block allocations (with more-complicated indexing for larger blocks), but that will need to be done separately based on how hyperbolic the geometry is. heptagons are common but would octagons make the mapping easier?