What a machine does with it

Hexagons cannot tile the sphere

Hexagons are the best cell shape a plane offers and the sphere will not take them. Euler's formula forces exactly twelve pentagons into any such tiling — twelve at 42 cells and twelve at 642, while the hexagon count rises twenty-one-fold — and each of the twelve is measurably smaller than the hexagons around it.

The previous rung ended with the obvious repair for a grid whose cells are the wrong shape: use hexagons.

The reasons are good ones. A hexagon has the best perimeter for its area of any polygon that tiles the plane, so a neighbourhood query fetches the fewest cells. Every one of its six neighbours shares an edge, and every one of their centres is the same distance away — where a square grid has four edge neighbours at one distance and four corner neighbours at another, and has to decide which count as adjacent. A hexagonal grid has no diagonals to argue about.

Both reasons can be given numbers, which is worth doing before the disappointment.

The perimeter a cell needs for a given area is what a neighbourhood query pays, and for a regular tiling of the plane it is a fixed constant times the square root of the area: 4.559 for triangles, 4.000 for squares, 3.722 for hexagons, against a circle’s 3.545 — which is the absolute lower bound for any shape at all. So a hexagonal grid pays seven per cent less boundary than a square one and comes within five per cent of the best a shape can do, and no other tiling of the plane does better.

The neighbours are the other half. A hexagon’s six neighbours all share an edge and all have their centres the same distance away. A square’s do not: four share an edge and four share only a corner, at √2 times the distance, so every question about a neighbourhood has to begin by deciding which of the two counts — the choice that inside is a claim about the edges shows has no neutral answer.

None of it is available on a sphere. A sphere will not be tiled by hexagons, and the obstruction is not a matter of degree.

A hexagonal tiling of the sphere, and its pentagons. 362 cells — 350 hexagons and 12 pentagons, the pentagons marked — drawn on Orthographic. The twelve are not a defect of the construction and cannot be removed by subdividing further: Euler's formula requires exactly twelve however many hexagons there are. Each pentagon here has 0.52 times the area of an average hexagon, so a count aggregated over these cells has twelve entries that mean something different from all the others.
Fig. 1 A hexagonal tiling of the sphere with 362 cells: 350 hexagons and twelve pentagons, with the pentagons marked. Subdividing further multiplies the hexagons and leaves the twelve exactly where they are. They are not an artefact of this construction and no construction avoids them.

The counting argument, which takes three lines

Suppose the sphere is tiled by p pentagons and h hexagons, with three faces meeting at every vertex — which is what a tiling by near-hexagons has, since four hexagons cannot meet at a point without overlapping.

Count the edges: each face contributes its own number of sides and each edge is shared by two faces, so E = (5p + 6h)/2. Count the vertices: each face contributes its own number of corners and each vertex is shared by three faces, so V = (5p + 6h)/3.

Euler’s formula says V − E + F = 2 for any tiling of the sphere. Substituting, with F = p + h:

5p+6h35p+6h2+(p+h)=2p6=2p=12\frac{5p+6h}{3} - \frac{5p+6h}{2} + (p + h) = 2 \quad\Longrightarrow\quad \frac{p}{6} = 2 \quad\Longrightarrow\quad p = 12

The hexagon count cancels completely. Twelve pentagons, whatever h is — twelve for a football, twelve for a tiling with a million cells, twelve always.

Setting p = 0 gives χ = 0 rather than 2, and a surface with χ = 0 is a torus. So a purely hexagonal tiling exists, and it is a tiling of a doughnut.

Verified on tilings that were built

The derivation is three lines of arithmetic and it is worth checking against objects rather than trusting, because the check costs nothing and because a construction that silently produced eleven or thirteen would mean the construction was wrong.

The tilings here are Goldberg polyhedra: subdivide each face of an icosahedron into m² triangles, project the result onto the sphere, and take the dual — one cell per mesh vertex.

m cells hexagons pentagons pentagon area, as a fraction of the mean hexagon
2 42 30 12 0.66
3 92 80 12 0.60
4 162 150 12 0.56
6 362 350 12 0.52
8 642 630 12 0.50

The hexagon count rises by a factor of twenty-one down that table and the pentagon count does not move.

Twelve pentagons, however many hexagons. Five hexagonal tilings of the sphere, from 42 cells to 642. The hexagon count rises by a factor of 21 and the pentagon count does not move: it is twelve, exactly, in every one. Euler's formula forces it — three faces at each vertex and only pentagons and hexagons leaves p = 12 whatever h is — and a tiling of hexagons alone gives χ = 0 rather than 2, so it does not exist.
Fig. 2 The two counts plotted against the size of the tiling. The pentagon line is flat at twelve — not approximately flat, exactly flat — while the hexagon line climbs. A quantity that stays fixed while everything around it changes by a factor of twenty is a topological invariant rather than a coincidence, and the flatness of that line is the whole of Euler’s formula seen from the side.

What the tiling’s spacing actually does

The pentagons are the visible failure. There is a quieter one alongside them, and it is worth measuring because it affects every cell rather than twelve.

On a 642-cell tiling of the Earth, the edges between neighbouring cells run from 440 to 604 kilometres — a ratio of 1.37 — and the pentagons’ edges average 483 kilometres against the hexagons’ 556. So a scheme that treats the distance between adjacent cell centres as a constant is wrong by up to a third, everywhere, not only at the twelve.

That is the same class of error as the one nearest is a question about the metric is about, arriving through the indexing rather than through the query: a nearest-cell search that ranks by hop count is ranking by a quantity that varies by 37 per cent in ground distance.

Where the twelve come from

They are not arbitrary. The twelve pentagons sit exactly at the twelve corners of the icosahedron the tiling was subdivided from, and those are the twelve points where the globe on a solid measures an angle deficit of π/3.

That is the same fact in two vocabularies. Descartes’ theorem says the angle deficits of a convex polyhedron total 4π; a hexagonal cell has no deficit at all, since three hexagons meeting at a vertex give exactly 2π; so all of the sphere’s curvature has to be carried by the cells that are not hexagons. Twelve pentagons at π/3 apiece is exactly 4π.

The icosahedron's faces, drawn on the sphere. The edges of the icosahedron projected radially onto the sphere, which is the partition of the world a polyhedral map uses: everything inside one spherical polygon is drawn on one flat face. Each face spans 25.8° from its centre to its own boundary, and the gnomonic map onto it reaches 6.6° of angular deformation at the corners. Drawn in an orthographic projection of the embedding, which is a map with its own distortion.
Fig. 3 The icosahedron whose corners become the pentagons. Its twelve vertices each carry an angle deficit of π/3, and twelve times π/3 is 4π — the total curvature of the sphere. A hexagonal grid does not remove that curvature, it concentrates it into twelve cells, exactly as a polyhedral map does.

The connection makes the obstruction feel less like an accident of counting. Twelve pentagons is Euler’s formula, and Euler’s formula in this setting is Gauss–Bonnet, and Gauss–Bonnet is the theorem no map is faithful is built on. The same statement stops a map from being faithful, stops a polyhedron from having no corners, and stops a hexagonal grid from being uniform.

The price, measured

The twelve are not merely present; they are different, and how different is a measurement rather than a matter of principle.

In the construction used here a pentagon has between 0.66 and 0.50 of the area of an average hexagon, falling as the tiling is refined. The overall spread of cell areas across a tiling — largest over smallest — runs from 1.80 at 42 cells to 2.49 at 642, and the minimum is always one of the twelve.

Three consequences follow, and every scheme in production documents them:

  • A count per cell is not a density. Twelve cells in the world have half the area of their neighbours, so a per-cell count over-represents them by a factor of two if the areas are ignored.
  • Neighbour arithmetic has twelve exceptions. A pentagon has five neighbours rather than six, so any traversal, any smoothing kernel and any “ring of radius k” has to special-case them. H3’s documentation calls this out explicitly, and code that does not handle it produces subtly wrong answers in twelve places out of a million.
  • Distances between cell centres are not uniform near a pentagon. The five neighbours of a pentagon are not at the same spacing as a hexagon’s six, so a scheme that treats cell-centre distance as a proxy for ground distance has a systematic error in twelve neighbourhoods.

None of that makes hexagonal grids a bad idea. It makes them a grid with twelve documented singularities, which is a very different object from the uniform tiling the plane offers and which is exactly what the geometry permits.

A hexagonal tiling of the sphere, and its pentagons. 92 cells — 80 hexagons and 12 pentagons, the pentagons marked — drawn on Orthographic. The twelve are not a defect of the construction and cannot be removed by subdividing further: Euler's formula requires exactly twelve however many hexagons there are. Each pentagon here has 0.60 times the area of an average hexagon, so a count aggregated over these cells has twelve entries that mean something different from all the others.
Fig. 4 The same construction at 92 cells, where the pentagons are large enough to see the difference. The twelve are visibly smaller than their neighbours and visibly five-sided, and at this coarseness the tiling is more obviously an icosahedron with rounded corners than a hexagonal grid.

The pentagon’s deficit is a shape term times an edge term

The area column falls from 0.66 to 0.50 as the tiling is refined, and the trend factors exactly into two quantities that behave quite differently.

A regular pentagon and a regular hexagon of the same edge length have areas 1.7205 s² and 2.5981 s², in the ratio 0.6623. That is a pure shape constant with no tiling in it, and it is the value the coarsest row of the table reports: at 42 cells the pentagons’ edges are essentially the hexagons’ and the area ratio is the shape ratio.

Everything below that row is the second factor. Dividing each measured ratio by 0.6623 and taking a square root gives the pentagons’ edge length relative to the hexagons’:

cells area ratio implied edge ratio
42 0.66 0.998
92 0.60 0.952
162 0.56 0.920
362 0.52 0.886
642 0.50 0.869

And the last row can be checked against the essay’s own edge measurement: 483 kilometres against 556 is a ratio of 0.869, which is the number the areas imply to three figures.

So the deficit is 0.6623 times the square of the edge ratio, and the two halves are different kinds of fact. The 0.6623 is geometry and cannot move: a pentagon is a pentagon and will always be two thirds of a hexagon on the same edge. The edge ratio is the construction’s, and it is what a better subdivision improves — a scheme that held the pentagons’ edges equal to the hexagons’ would land at 0.66 rather than 0.50, and no scheme can do better than 0.66 while the cells are regular polygons.

That splits the practical question cleanly. A production grid’s smaller area spread, mentioned in the essay’s limits as a property of a different subdivision, is entirely a gain on the second factor; the first is a floor. The best any hexagonal global grid can do is twelve cells at two thirds the area of the rest, and the constructions here are at three quarters of that best.

The edge ratio’s trend is also worth reading. It falls 0.998, 0.952, 0.920, 0.886, 0.869 — decreasing and decelerating, which is a sequence approaching a limit rather than one heading to zero. The twelve do not become arbitrarily small as the grid is refined; they settle at a fixed fraction of their neighbours, and the fraction is a property of the subdivision rule.

Twelve is small, and that is the argument for using them anyway

Nothing above is a reason not to use a hexagonal grid, and it is worth being explicit about that, because a list of defects reads like a verdict.

On the 642-cell tiling, twelve cells out of 642 is 1.9 per cent of them. At the resolutions these schemes are actually used at — H3’s finer levels have hundreds of millions of cells — twelve is a vanishing fraction, and the twelve are at fixed, known positions that can be listed once and special-cased forever.

Compare that with the lon/lat grid’s failure from the previous rung: there the area spread is 163 at level 8 and it affects every cell, growing with the level. Here the anomaly is a fixed set of twelve, and refinement makes them relatively less important rather than more.

That is the real argument for hexagons on a sphere, and it is a comparison rather than a claim: the obstruction is genuine, it is provable, it is twelve cells, and the alternative’s obstruction is unbounded and everywhere.

The object everybody already owns

The theorem has a domestic instance, and it is worth pointing at because it makes the count concrete.

A football is twenty hexagons and twelve pentagons — a truncated icosahedron, and one of the Goldberg polyhedra this construction generates, though not one of the class the table above lists. The twelve black patches are not a design choice, a manufacturing convenience or a tradition. They are Euler’s formula, and a ball made of hexagons alone would be a doughnut.

A hexagonal tiling of the sphere, and its pentagons. 42 cells — 30 hexagons and 12 pentagons, the pentagons marked — drawn on Orthographic. The twelve are not a defect of the construction and cannot be removed by subdividing further: Euler's formula requires exactly twelve however many hexagons there are. Each pentagon here has 0.66 times the area of an average hexagon, so a count aggregated over these cells has twelve entries that mean something different from all the others.
Fig. 5 The smallest tiling in the table: 42 cells, thirty hexagons and twelve pentagons. A football has twenty hexagons and the same twelve pentagons; the hexagon counts differ because the two are different members of the same family, and the pentagon count does not, because that is the part no member can change.

The same count turns up wherever a roughly-spherical surface is made of roughly-hexagonal pieces: a geodesic dome, the carbon-60 molecule, the protein shell of many viruses. Each of them has exactly twelve five-sided pieces, and each of them has been described in the literature of a different field as though it were a fact about footballs, or about carbon, or about viruses.

Why the square schemes have the same problem in a different place

A cube-based scheme has no pentagons. It has eight corners with an angle deficit of π/2 apiece — 8 × π/2 = 4π again — and the deficit shows up as the corner cells being the worst-behaved ones.

Tangent-warped cube cells, shaded by area. The tangent-warped cube at level 3, drawn on Mollweide with each cell shaded by its own measured area. The largest cell is 1.29 times the smallest. Every area is computed with the spherical polygon formula from the cell's own boundary, not from the scheme's intentions, and the shading is what the numbers say rather than what the mesh looks like.
Fig. 6 A cube scheme at level 3, shaded by area. The pattern is a six-fold one with the extremes at the face corners, which are the cube’s eight vertices — the same eight points where its angle deficit sits. The curvature is not removed by choosing squares instead of hexagons; it is moved to a different set of special cells and a different number of them.

That comparison is the honest way to put the whole thing. Every global grid concentrates the sphere’s 4π of curvature into a finite set of special cells, and the choices available are how many, where, and how bad. Twelve pentagons on an icosahedral grid, eight corners on a cube, two poles and a seam on a lon/lat grid.

What a scheme does about the twelve

Knowing the twelve are unavoidable, the practical question is what to do, and there are exactly three answers in use.

Document and special-case them. H3 publishes the twelve cell indices, and code that traverses neighbours checks for them. This is the honest option and it is what production systems do.

Put them where nobody looks. The icosahedron’s orientation is free — the same three degrees of freedom the cut has to go somewhere shows a polyhedral map spending on its tears — so the twelve can be rotated into the oceans. H3’s orientation does exactly that, and it costs nothing metric, precisely as the polyhedral case does.

Use a scheme with a different singularity. A cube-based grid has eight corner singularities instead of twelve pentagonal ones, and a lon/lat grid has two poles and a seam. None of them has none.

The third option is the one that makes the count feel less like a defect of hexagons: every scheme has singular cells, because every scheme has to put the sphere’s 4π of curvature somewhere, and the only choices are how many places and how bad each one is.

A hexagonal tiling of the sphere, and its pentagons. 642 cells — 630 hexagons and 12 pentagons, the pentagons marked — drawn on Orthographic. The twelve are not a defect of the construction and cannot be removed by subdividing further: Euler's formula requires exactly twelve however many hexagons there are. Each pentagon here has 0.50 times the area of an average hexagon, so a count aggregated over these cells has twelve entries that mean something different from all the others.
Fig. 7 The finest tiling in the table: 642 cells, 630 hexagons and the same twelve pentagons. At this resolution the twelve are 1.9 per cent of the cells and at the resolutions these schemes are used at they are a vanishing fraction — the obstruction is real, fixed and small, which is the argument for using hexagons rather than against it.

Where the model stops

The tilings here are class-I Goldberg polyhedra, built by the simplest subdivision — barycentric division of each icosahedral face, then normalisation onto the sphere. Production schemes use a different subdivision and a gnomonic step to make the cells more nearly equal, and their measured area spreads are lower than the 2.5 quoted above. Nothing about the pentagon count depends on any of that; the areas do.

Three faces at every vertex is an assumption. A tiling in which four faces meet at some vertices is not covered by the counting above, and such tilings exist — the lon/lat grid is one, at its poles. What the argument establishes is that a tiling by pentagons and hexagons with three-way vertices has exactly twelve pentagons, which is the case every hexagonal global grid is.

The curvature argument here is the discrete one. Saying that hexagons carry no deficit and pentagons carry it all is the same statement total curvature and the scale rule makes for smooth surfaces, in the form the globe on a solid uses: curvature integrated over a closed surface is a topological invariant. The tiling has 4π of it whatever the cells are.

The pentagons’ area deficit is a property of this construction, not a theorem. That there must be twelve non-hexagons is forced; that each is half the area of a hexagon is measured on the tilings built here and would differ under another subdivision.

Raw cube cells, shaded by area. The raw cube at level 2, drawn on Mollweide with each cell shaded by its own measured area. The largest cell is 2.50 times the smallest. Every area is computed with the spherical polygon formula from the cell's own boundary, not from the scheme's intentions, and the shading is what the numbers say rather than what the mesh looks like.
Fig. 8 The unwarped cube scheme, whose eight corner cells are the smallest and whose face centres are the largest — a factor of 2.48 across the scheme. Its singular cells are eight rather than twelve and its defect is spread over every cell rather than concentrated in a fixed few, which is the comparison this section is about.

The factorisation also settles what the twelve cost an aggregation, in a form that does not depend on the construction. A count per cell over-represents a pentagon by the reciprocal of its area ratio, so the over-representation is at most 1/0.6623 = 1.51 for any hexagonal grid whatever, and is 2.0 for the constructions measured here. That is a bound rather than a measurement, and it is the number a scheme’s documentation could carry beside the twelve indices it already publishes.

Who found it, and when

Euler stated his formula in 1750 and the first correct proof is Cauchy’s, from 1813. Its application to hexagonal tilings is a standard exercise, and it is also the reason a football has twelve black patches — a fact that circulates widely and is rarely presented as a theorem, which it is.

Michael Goldberg described the polyhedra that carry his name in 1937, in a paper about maximising volume for a given surface area. The application to global grids is much more recent: hexagonal discrete global grids were proposed through the 1990s and 2000s, and Uber’s H3 — a class-II Goldberg construction on an icosahedron — was released in 2018 with the twelve pentagons named on the first page of its documentation.

Where the ladder goes next

Two rungs have shown that the obvious scheme has cells of wildly unequal area and that the best-shaped cells cannot cover the sphere uniformly. What has not been asked is whether the two failures can be traded against each other — whether a scheme can hold every cell to exactly the same area, and what that does to the shapes.

It can, exactly, and the next rung measures what it costs.

Named alongside this one

Essays reaching for the same objects. Nobody chose these; they are what the concept index makes visible.

What links here

The 8 essays that link to this one and share the most of its objects, of 11 that link here.

The objects this essay names

Each one links to every other essay that touches it.

AggregationAngle deficitCellDiscrete global gridEuler characteristicGoldberg polyhedronHexagonIcosahedronLocalityTopology