Hacker News new | ask | show | jobs
by oggyhead 2919 days ago
I wonder how does the math of this stack up against using space-filling curves in Google's S2?
1 comments

Well other than the fact that it's impossible to tesselate a sphere with hexagons it really depends what you're interested in. Space filling curves would necessarily behave badly in some areas, but could be simpler.

Not sure why they didn't use squares.

They go into it a bit in the article.

A lot of the reasons seem reminiscent of why hexagons are awesome in video games: https://www.redblobgames.com/grids/hexagons/

I'm a bit curious about this, I am a video game developer (3d console games) and hexagon coordinate systems don't strike me as being awesome. Reading through the article you linked to confirmed my suspicion that there would be a great many possible parameterizations, and it seems like the kind of thing that wound cause a lot of confusion amongst developers, much like Euler angles do. I had hoped that the article would start with some kind of motivation section describing why one would be willing to suffer such horrible inconveniences, but the article got too far into the not gritty before explaining the benefits (I stopped reading half way through so maybe it was buried in there somewhere?)

I know that they are associated with rpg board games and therefore have found their way in to 2D RPG video games as well. I can see a slight advantage to using them on a board game situation where it would make it more accurate to estimate diagonal distances by counting tiles, but in a computational situation where your box can compute the Pythagorean theorem a few million times a second, the benefit of using hex systems in games eludes me.

Nice. Thanks.

I'm very curious about H3's lat/long => hex cell system. I'll be studying their geoToH3 function soonest. https://uber.github.io/h3/#/documentation/api-reference/inde...