News for hackers. Stuff that matters.
Re:Hexagon Spiral Coordinates by somat on Saturday March 15, 2025 @11:53PM (#43376851)
whats the Hilbert curve equivalent for hexagon tiles?

I used the Moore variant(closed form vs open form) of the Hilbert curve once, I had this fever dream of how Monopoly would be more fun if the players had more agency. using the moore curve as the cost function I came up with a board. If I ever regain enthusiasm for the project I will give each square a name and call it "The Walled City" after the infamous city near Hong-Kong.

http://nl1.outband.net/extra/board.svg

if you follow the zero cost path it forms a moore curve, but you can pay extra to take shortcuts. the interesting part was that the definition of the curve was expressed as a L-system so I ended up having to make a partial l-system parser to generate the cost function.

Re:Hexagon Spiral Coordinates by rphln on Sunday March 16, 2025 @08:34AM (#43378532)
This apparently fits the bill: https://patricksurry.github.io/posts/flowsnake/. Amit's post led me to search about recursive coordinates for hexes again and I came across it in a StackExchange comment.