Hi there, I have a hex grid that grows in a spiral and am trying to figure out how to assign (x,y) values to a hexagon.
/ \__/ \__/ \__/ \__/ \__/ \
\__/ \__/ \__/41\__/ \__/ \__/
/ \__/.. \__/40\__/42\__/ \__/ \
\__/62\__/39\__/22\__/43\__/ \__/
/ \__/38\__/21\__/23\__/44\__/ \
\__/61\__/20\__/ 9 \__/24\__/45\__/
/ \__/37\__/ 8 \__/10\__/25\__/ \
\__/60\__/19\__/ 2 \__/11\__/46\__/
/ \__/36\__/ 7 \__/ 3 \__/26\__/ \
\__/59\__/18\__/ 1 \__/12\__/47\__/
/ \__/35\__/ 6 \__/ 4 \__/27\__/ \
\__/58\__/17\__/ 5 \__/13\__/48\__/
/ \__/34\__/16\__/14\__/28\__/ \
\__/57\__/33\__/15\__/29\__/49\__/
/ \__/56\__/32\__/30\__/50\__/ \
\__/ \__/55\__/31\__/51\__/ \__/
/ \__/ \__/54\__/52\__/ \__/ \
\__/ \__/ \__/53\__/ \__/ \__/
/ \__/ \__/ \__/ \__/ \__/ \
\__/ \__/ \__/ \__/ \__/ \__/
hex 1 - (0,0)
2 - (0,1)
3 - (1,1)
4 - (1,-1) etc...
Any ideas on how to actually make the conversion?
Thanks