# Tag Info

## Hot answers tagged hexagonal-grid

10

I don't recommend using the "increase the dimensions and orbit in a cylinder" trick here. It has several disadvantages: More expensive to compute: Perlin noise needs to select and interpolate $d^2$ gradient vectors per evaluation, so going from 2 dimensions to 5 means doing 8x more work. More distortion: by evaluating it on a membrane in higher-...

2

I figured it out. For anyone else in the future I followed the posts by Sander Evers that amitp suggested (thanks both of you), just the small_to_big and center_of functions in combination will give you the relative coordinate. One thing to note is the functions will tile the map with the southern mirror shifted right (and other mirrors following suit). ...

2

The height of each individual hexagon is 84px including shadow but the shadow only matters for the last row. So we need to know the size without shadows. I believe the height of the hexagon without shadow is 73px. For all rows except the last row, there is overlap in heights by 1/4 of the hexagon height. The second row starts at 3/4 of the hexagon height. (...

1

In case anyone needs it, here's the C# implementation of Patel's algorithm: IEnumerable<Hex> GetRange(Hex center, int range) { var inRange = new List<Hex>(); for (int q = -range; q <= range; q++) { int r1 = Math.Max(-range, -q - range); int r2 = Math.Min(range, -q + range); for (...

Only top voted, non community-wiki answers of a minimum length are eligible