How to draw/manage a hexagon grid?
- by W.N.
I've read this article: generating/creating hexagon grid in C . But look like both the author and answerer have already abandoned it.
v(hexagonSide - hexagonWidth * hexagonWidth): What's hexagonSide and hexagonWidth? Isn't it will < 0 (so square root can't be calculated).
And, can I put a hexagon into a rectangle? I need to create a grid like this:
One more thing, how can I arrange my array to store data, as well as get which cells are next to one cell?
I have never been taught about hexagon, so I know nothing about it, but I can easily learn new thing, so if you can explain or give me a clue, I may do it myself.