Live data from Hacker News

Hexagonal Grids (2013)

redblobgames.com

41–47 of 47 posts

Re: Hexagonal Grids (2013)

#41

Earlier quoted context omitted.

I just want to make it clear that there's a real reason behind H3, not just "invent something really cool." I don't work at Uber, anymore, but I did work on the team that originated H3 and worked on H3. To condense it down to a few bullet points, we realized: 1. We needed to move from geofences to a grid for both data science reasons and scaling reasons to perform realtime aggregated and anonymized activity analysis…

excellent -- reading carefully; this one is fun .. https://github.com/uber/h3-py/blob/master/docs/UnifiedDataLa...

Using H3 to analyze data originally indexed in different formats is definitely cool, but you can totally do that with S2 as well.

I personally feel the unidirectional edges[1] are a real differentiator. If you have these space-time buckets and compare counts between two points in time, you can see the change in density, but you don't know how active it is. Tracking transitions between hexagons in an anonymous, aggregated fashion lets you see if the "stagnant" areas of your map are stagnant because the actors actually aren't moving, or if there's a large "mixing" of the actors but you've reached a quasi-static-equilibrium in the system.

It also lets you see which regions are more connected to each other if, for instance, hexagon A always flows back and forth with hexagon B which also flows back and forth with hexagon C bordering both but no such flow between C and A, so from data you can spot potential rivers, deduce roadblocks/accidents, that certain businesses must be closed, etc.

[1](https://uber.github.io/h3/#/documentation/api-reference/unid...)

Re: Hexagonal Grids (2013)

#42
post #38
post #8

A surprise to see my page on HN! For those of you curious about the tech: Diagrams are in SVG. Canvas would be faster but SVG is easier for me to work with, especially for attaching mouse events to each hexagon. It also automatically scales to high dpi displays. With SVG and HTML accessed the same way, I can use the same code for updating text/samples as I do for updating diagrams. This includes interpolating values…

Hey, I'm an astrophysicist in high energy gamma ray astronomy. Or telescope sensors have hexagonal pixels. You website is awesome and helped a lot writing the coordinate trafos and other stuff. We always recommended it to everyone involved. One switch I always wished it had was to switch to a cartesian coordinate system where x points right, y points up and negative coordinates are allowed.

Cool! Glad the page helped! On the implementation page the code supports both y-up and y-down, as well as negative coordinates. One of these days I should update the diagrams on the main page to support this too.

Re: Hexagonal Grids (2013)

#43
post #8

A surprise to see my page on HN! For those of you curious about the tech: Diagrams are in SVG. Canvas would be faster but SVG is easier for me to work with, especially for attaching mouse events to each hexagon. It also automatically scales to high dpi displays. With SVG and HTML accessed the same way, I can use the same code for updating text/samples as I do for updating diagrams. This includes interpolating values…

Thank you so much for your wonderful documentation. The H3 team at Uber used it so much for so many things. :)

Wow, awesome to hear it!

Re: Hexagonal Grids (2013)

#44
post #8

A surprise to see my page on HN! For those of you curious about the tech: Diagrams are in SVG. Canvas would be faster but SVG is easier for me to work with, especially for attaching mouse events to each hexagon. It also automatically scales to high dpi displays. With SVG and HTML accessed the same way, I can use the same code for updating text/samples as I do for updating diagrams. This includes interpolating values…

Hey Amit A big thanks for your site. As someone who fiddles around with small hobbyist game projects, your site is the defacto bible for me. I was wondering if you plan on writing something on game AI. specially where the AI has infinite permutations of actions that they can take. How do these game AIs actually formulate a list of possible actions and how do they prioritise them?

Thanks! I've found that my best pages are topics from real projects I've worked on, and I haven't worked on many game AI systems. I might have pointers to papers or web sites for you; feel free to email me at redblobgames@gmail.com

Re: Hexagonal Grids (2013)

#45
post #12
post #8

A surprise to see my page on HN! For those of you curious about the tech: Diagrams are in SVG. Canvas would be faster but SVG is easier for me to work with, especially for attaching mouse events to each hexagon. It also automatically scales to high dpi displays. With SVG and HTML accessed the same way, I can use the same code for updating text/samples as I do for updating diagrams. This includes interpolating values…

Love all the content on your site, keep writing more new things please!

Thanks! I'm keeping a list of ideas here: https://trello.com/b/mjOSMtsi/2019 but I'm not working on much at the moment. I needed a break after mapgen4 (2017-2018).

Re: Hexagonal Grids (2013)

#46
post #38

Earlier quoted context omitted.

Hey, I'm an astrophysicist in high energy gamma ray astronomy. Or telescope sensors have hexagonal pixels. You website is awesome and helped a lot writing the coordinate trafos and other stuff. We always recommended it to everyone involved. One switch I always wished it had was to switch to a cartesian coordinate system where x points right, y points up and negative coordinates are allowed.

What drove the decision to go with hexagonal pixels? Sounds pretty crazy and cool.

Historically, the "pixels" are mostly round photomultiplier tubes. So the natural way to place those is a hexagonal grid.

     o o
    o o o
     o o
   
The pixels are very sensitive, we can register single photons with a time resolution of half a nano second.

Quite recently, some telescopes started using silicon photo multipliers, which are mostly square by design.

But: The first telescope to use those also used light concentrators to increase the detector area and these have hexagonal entrance windows, so we also have hexagonal pixels.

Physicists like symmetries, and light concentrators are more effective when round than square, hexagonal is a good middle ground.

Re: Hexagonal Grids (2013)

#47
post #46

Earlier quoted context omitted.

What drove the decision to go with hexagonal pixels? Sounds pretty crazy and cool.

Historically, the "pixels" are mostly round photomultiplier tubes. So the natural way to place those is a hexagonal grid. o o o o o o o The pixels are very sensitive, we can register single photons with a time resolution of half a nano second. Quite recently, some telescopes started using silicon photo multipliers, which are mostly square by design. But: The first telescope to use those also used light concentrators…

Thanks for explaining! Makes sense.
Post reply on HN