Hexagonal geodesic map
Hello,
I don't find on the web the mathematic formule or routine for know the hexagones 3d position and rotation for this type of grid (is an icosahedron dual ?) :
My 0;0;0 position would be the center of the map, and i would like choose the size between 2 pentagons (If I understood correctly, there are always 12 pentagons), like that :
I specify, I have an hexagon mesh, and I doesn't want the method for build the mesh of the grid (On the web, I found only this type of solution). I want to know only the position and rotation of one of the hexagone, with a id.
Schematic example of what I want :
#define PENTAGONS_NUMBER 12
buildMap(10);
void buildMap(int _size)
{
int numberHexagons = computeNumberOfHexagons(_size);
for(int i = 0; i < numberHexagons; i++)
{
GameObject go = Instantiate(prefabHexagon, getHexagonPosition(i), getHexagonRotation(i)) as GameObject;
}
}
So, can you help me for find (or if you know, give) the routine/formule/explanation for the shematics functions computeNumberOfHexagons(), getHexagonPosition() and getHexagonRotation() ?
Thanking you ! :)
Did you ever figure this out? I myself have an idea for a game on a goldberg polyhedron.