3 ms·
Also check out Uber's H3 - https://eng.uber.com/h3/ https://eng.uber.com/h3/ For less distortion, it uses hexagons.
by danielvf 8y ago
Also check out Uber's H3 - https://eng.uber.com/h3/ https://eng.uber.com/h3/
For less distortion, it uses hexagons.
- samirahmed 8y agofrom my understanding, H3 doesn't guarantee that a child cell falls strictly inside the geographical region of its parent (since is a hexagon cannot be perfectly comprised of smaller hexagons). While the hexagon has less distortion - we loose some of the nice child <> parent guarantees that S2 offers in my experience.
- malandrew 8y agoHexagons are all equidistant from their neighbors and all share the same size edge with all neighbors. This allows you to do cool stuff like k-rings. These properties are useful for all sorts of reasons. With S2 cells there are two different distances to neighbors at the corners vs the sides and the neighbors at the sites have long borders and neighbors at the corners have vertice borders. Both S3 and H3 are useful, but for different reasons. It's worth knowing the benefits and tradeoffs of both and choosing the solution that fits your particular problem. H3 uses Buckminster Fuller's Dymaxion project and puts the 20 pentagonal vertices all in the ocean. I'm not sure the impact of this for maritime usage and I'm not sure if there is yet a different orientation that puts all vertices on land, so you can use it for maritime usage without having to concern yourself with these vertices.
- lodi 8y ago> Hexagons are all equidistant from their neighbors and all share the same size edge with all neighbors. Technically, in spherical geometry this isn't true. It's actually not possible to tile the sphere with regular hexagons (even after including those 12 pentagons). Unlike a planar tiling, some hexagons end up bigger or smaller than others, the internal angles aren't all equal to each other, and the internal angles sum to more than 360 degrees. This page has some good diagrams where this effect is readily visible: https://en.wikipedia.org/wiki/Goldberg_polyhedron https://en.wikipedia.org/wiki/Goldberg_polyhedron
- contravariant 8y agoAlthough rather unfortunately a sphere can't be tiled by hexagons.
- Waterluvian 8y agoThis reminds me of RimWorld hiding pentagons throughout its world in order to satisfy this issue.
- contravariant 8y agoKind of makes you wonder how many you'd need. Now ignoring some cheats, like just putting 6 vertices on the equator and calling both hemisphere a hexagon, a shape consisting solely of 'h' hexagons and 'p' pentagons will have (h+p) faces, (6h+5p)/2 edges and at most (6h+5p)/3 vertices (we're forbidding the construction where you just cut an edge into two and claim you've created a vertex, so each vertex is part of at least 3 faces). This gives an Euler characeristic of at most: (6h+5p)/3 - (6h+5p)/2 + (h+p) = (6h+5p)/6 - (h+p) = (1/6) p. Since a sphere has a characteristic of 2 you need at least twelve pentagons. And apparently you can achieve this lower bound by subdividing the triangular faces of an icosahedron, leaving you with 12 pentagons at the corners of the icosahedron.
- Waterluvian 8y agoApparently RimWorld uses 12 pentagons: https://rimworldwiki.com/wiki/World_generation https://rimworldwiki.com/wiki/World_generation Well done.