Hexagonal Grids (2013)

This guide provides various ways to create hexagonal grids, along with their relationships and common formulas and algorithms. The author has been collecting hex grid resources for over 25 years and presents the most elegant approaches that result in simple code. The guide includes interactive sections on geometry, coordinate systems, conversions, neighbors, distances, line drawing, range, rotation, reflection, rings and spirals, field of view, and more. The code samples are written in pseudo-code, but there are also implementations in multiple programming languages. The guide recommends using axial or cube coordinates for algorithms and storage, but also discusses offset and doubled coordinates.

https://www.redblobgames.com/grids/hexagons/

To top