I am looking to incorporate a hex grind into my latest project and have been looking at how they are created.
I have found information on how to define a hex via geometry and also found some nice example codes to create a hex grid but am having trouble cross referencing the two bits of information to understand how the geometry of a hexagon relates to the code to create a hex grid. Primarily this is due to the code examples having a fair few bells and whistles attached as in this nice (reasonably short) example
Which makes something similar to what i was looking at but i am having trouble picking through the chaff to get to the basic grid code that simply creates the hex and the grid.
Could someone point me in the direction of a hex grid example with a description of what each part is doing or maybe cut the chaff from this code so i am left with the basic code to create a hex and the hex grid so i can cross reference it better?