Hacker News new | ask | show | jobs
by dragonwriter 2021 days ago
> Hexagonal grids give you precise measurements in exactly 6 directions.

Square grids give you precise measurements in exactly 4.

> If you approximate sqrt(2) as 1.5 then square grids give you pretty darn accurate measurements in 8 directions, including 2 pairs of directions that are orthogonal

If you approximate sqrt(3) as 1.75, then hex grids give you pretty darn accurate measurements in 12 directions, including 3 pairs of directions that are orthogonal.

(If square grids have an advantage here, it's that the quantum of measurement the same on each axis of each orthogonal pair, 1 on one axis and 1.5 on the other; whereas each orthogonal pair on a hex grids has one axis with quantum 1 and one with quantum 1.75.)

> Furthermore the distance between two points can be quickly calculated with (long-side + 1/2 short-side), which is doable in your head, unlike the distance calculation on a hex grid.

The equivalent loose approximation on a hex grid would seem to be long direction minus 1/4 short direction, which doesn't seem any harder.

2 comments

> The equivalent loose approximation on a hex grid would seem to be long direction minus 1/4 short direction, which doesn't seem any harder.

As promised in a sibling comment I would work it out on paper. By my path, using the 7/4 approximation for sqrt(3), the ratio between X and Y directions is 12:21 which is much harder to do in your head than the 3:2 that a square grid gives you. However, a simpler approximation of (5:3) with acceptably low error came out.

Math (see diagram below)

Normalizing your 1.75 approximation to 7 "units" then the sides of the hexagon are of length 7, the distance from center to corner is length 7, and the distance from center to side is 6. This gives a distance from A to other points as:

B: 12 (Center -> Side -> Center)

C: 12 (Center -> Side -> Center)

D: 21 (Center -> Corner -> Corner -> Center)

Given that the actual value of A->D is ~20.784 that suggests approximating A->D = 20 alowing us to reduce as follows:

B: 3

C: 3

D: 5

This has a ~3.7% error in the horizontal direction.

       ______            ______      
      /      \          /      \     
    /    B     \______/          \___
    \          /      \          /   
      \      /          \      /     
        ----      C       ----       
      /      \          /      \     
    /    A     \______/    D     \___
    \          /      \          /   
      \      /          \      /     
        ----              ----       
      /      \          /      \     
    /          \______/          \___
    \          /      \          /   
      \      /          \      /     
        ----              ----
> As promised in a sibling comment I would work it out on paper. By my path, using the 7/4 approximation for sqrt(3), the ratio between X and Y directions is 12:21

Well, yes, 4:7 is 12:21.

But I think 4:7 is a lot easier to do in your head than 12:21 (3:5 is a little easier, at the expense of being less accurate); not sure why you did all that work to make it more complicated when you started with a fraction that gave you the ratio in its simplest form.

I haven't seen the 1.75 approximation; I'll have to work that out on paper later.
No need. I got you fams

sqrt(3) = 1.73205080757

https://duckduckgo.com/?q=sqrt+3&ia=calculator

I wasn't planning on working out sqrt(3) on paper, but rather the claimed approximation from GP's post. See my sibling comment for details when I did.