Covering Earth with Hexagonal Map Tiles [closed]
Take a look at vraid/earthgen; it uses hexagons (plus a few pentagons) and includes source code (see planet/grid/create_grid.cpp).
As of 2018 a new version is available based on racket.
Well, lots of people have made the point that you can't tile the sphere with hexagonal tiles - maybe you are wondering why.
Euler stated (and there are lots of interesting and different proofs, and even a whole book) that given a tile of the sphere in x Polygons with y Edges total and z vertices total (for example, a cube has 6 polygons with 12 edges and 8 vertices) the formula
x - y + z = 2
always holds (mind the minus sign).
(BTW: it's a topological statement so a cube and a sphere - or, to be precise, only their border - is really the same here)
If you want to use only hexagons to tile a sphere, you end up with x hexagons, having 6*x edges. However, one edge is shared by each pair of hexagons. So, we only want to count 3*x of them, and 6*x vertices but, again, each of them is shared by 3 hexagons so you end up with 2*x edges.
Now, using the formula:
x - 3*x + 2*x = 2
you end up with the false statement 0 = 2
- so you really can't use only hexagons.
That's why the classical soccer ball looks like it does - of course modern ones are more fancy but the basic fact remains.
It is impossible to cover a sphere with regular tiles (except for long and thin "orange slices". So the optimal way to pixelize a map, given certain constraints or requirements, is actually a pretty difficult research problem.
One sort of tiling used very often (in astrophysics) is the HEALPIX pixelisation: http://healpix.sourceforge.net/
This pixelization satisfies the equal-area requirement; it's impossible to make everything equidistant, however.
Another pixelization is "GLESP", which has some different properties (and isn't as polished a software package): http://www.glesp.nbi.dk/
The first website that comes to mind is Amit's Game Programming Information and its collection of links on hexagonal grids.
You can't cover a sphere with equal hexagons, but you could cover it with a geodesic, which is mostly hexagons, with 12 pentagons at the vertices of an icosohedron, and the hexagons slightly distorted to make it bulge into a sphere.