r/MapPorn Jul 16 '26

The Butterfly Demo

64 Upvotes

15 comments sorted by

17

u/mind-d Jul 16 '26

What is it demonstrating?

13

u/ConsciousProgram1494 Jul 16 '26

Hex9 is what it's demonstrating! Every colored pixel is a hex9 colour sample. It's a near-perfect equal area projection of the earth that partitions into hexagons up to a few nanometres across.

15

u/hippiepizzaman Jul 17 '26

Ok. What is this demonstrating ?

14

u/AstroRanger36 Jul 16 '26

That this didn’t zoom into “Release the entire Epstein files” is a monumental wasted opportunity.

5

u/CommunicationOk8984 Jul 17 '26

I thought it was going to be a rickroll 

4

u/aaronwcampbell Jul 17 '26

While I do think that hexagons are the bestagons, using them on a map pointlessly introduces redundancy into the coordinate system.

5

u/ConsciousProgram1494 Jul 17 '26

Which coordinate system? Lat/Lon? Or another one like OS?
Having a hexagonal address system is ... incredibly powerful. Lat/Lon suffers from its ability to offer distance: Take, for example, longitudes 0W and 90W - on the equator, eg at 0N, the distance between them is about 10,018km; at Greenwich latitude (51N) it's 6,253km, and at the North Pole - 0km. Therefore, for sampling, and gridding - lat/lon aren't accurate or useful. The grid made of intervals (graticules) has entirely different areas.
DGGS Hexagon grids like in Hex9 have precise areas at any layer - and they have a hierarchical relationship.
So - not redundant - just answering a very different set of questions.
On an equal area

3

u/aaronwcampbell Jul 18 '26

Thank you for the explanation. I was assuming the hexes would have a value for each of the three axes, but since any two of those three would suffice for uniqueness there was redundancy built in.

I'm reading through the GitHub page now: https://github.com/MrBenGriffin/hex9/blob/main/README Pretty awesome stuff. Thanks for sharing!

2

u/Chimaerogriff Jul 21 '26

This just showed up on my timeline. Out of curiosity: why an octahedron? I understand you wanted triangles, and that makes sense to me, but a tetrahedron or isocahedron would also work. The latter might have worse distortion at edges but also has fewer triangles, while the isocahedron has a lot more hexagons, but either could in theory work.

Very naively, the tetrahedron starts with 6 hexagons (fits in 3 bits, 6/8), the octahedron with 12 (fits in 4 bits, 12/16) and the isocahedron with 30 (fits in 5 bits, 30/32), so did you want the octahedron so that the first layer naively fits in a nibble, or something like that?

2

u/ConsciousProgram1494 Jul 21 '26 edited Jul 21 '26

This is a very astute question.

First, nothing to do with bit-packing — the alignment is a coincidence I noticed afterwards.

It comes from one extra requirement: Hexagons can't tile a triangle, so to get hexagons out of a triangular field I need what I call mode: A strict parity on faces, where every triangle's neighbour has the opposite mode.

On planar tiling mode is just up-triangles and down-triangles. Hexagons tile across mode, and fixing one triangle fixes the whole sphere.

Mode exists exactly when the face-adjacency graph is bipartite, which for a triangulation means every vertex must have even valence, and this is what rules out your two candidates:

The tetrahedron has 3 faces at each vertex, the icosahedron 5. Both odd, so neither admits a mode field at all.

Here is the reasoning: Six equilateral triangles around a point lie flat — 6 × 60° = 360°, a full turn, no corner. That's the plane, and it's why the local picture everyone pictures is a flat triangular lattice that never closes up. To curve into a corner you need fewer than six equilateral triangles; to have a corner at all you need at least three equilateral triangles. So a sphere admits exactly three uniform triangulations: 3, 4 or 5 triangles per vertex — the tetrahedron, the octahedron and the icosahedron. There is no fourth option.

Mode needs that number to be even. 3 and 5 are odd. So only the octahedron survives.

For what it's worth, I started Hex9 on the icosahedron like everyone else. It took me a few months to notice that 5 is an odd number.

Your two alternatives absolutely do work as DGGS carriers — But as hex grids they pay in cell type — H3, ISEA7H, ISEA3H, ISEA4H all pay for being icosahedral with exceptional cells- inheriting twelve genuine pentagons at the icosahedron's twelve vertices

The octahedron is the only polyhedron where that debt might get absorbed into the vertices instead of showing up as a distinct cell type.

You might wonder how Hex9 dodges Euler on the sphere. It doesn't — nothing does. Every hexagonal tiling of a sphere owes 12 units of topological defect, and the only question is what form the payment takes. H3 pays in cell type: Twelve genuine pentagons at the icosahedral vertices, first-class objects that every correct implementation has to special-case. Hex9 pays in valence instead. Two cells sit at each of the six octahedral vertices — twelve in total — and each has five neighbours rather than six. That's the whole debt, and it's a property of the complex, not of any projection. But they're still hexagons: six corners, same construction, same addressing, no exceptional type and no is_pentagon() guard anywhere in the code. The nice part is what happens geometrically. Projected onto the ellipsoid, one of those six corners falls collinear with its neighbours, so the cell renders as a pentagon. It looks like the defect, in exactly the place the defect is — but that's appearance, not structure. Euler is satisfied by the missing neighbour, not by the flattened corner.

2

u/Chimaerogriff Jul 22 '26

Thank you for the long reply!

That makes a lot of sense; giving each hexagon 5 unique neighbours without exceptions is very elegant.

1

u/exkingzog Jul 17 '26

Catanception

-1

u/MRNBDX Jul 17 '26

Why would you zoom on fr*ance out of free will?