Generator family

A cell scheme, and what it trades

cell-scheme draws the mesh shaded by area, which is the only way the schemes differ visibly; hex-tiling is the scheme that cannot close; cell-precision is what a cell identifier costs in digits; cell-tradeoff is area against shape; and cell-query is what happens when a disc is asked of a mesh of cells.

cell-scheme draws the mesh shaded by area, which is the only way the schemes differ visibly; hex-tiling is the scheme that cannot close; cell-precision is what a cell identifier costs in digits; cell-tradeoff is area against shape; and cell-query is what happens when a disc is asked of a mesh of cells.

Every one of these is the same generator answering a different question, which is why they share a file, a set of colour roles and a set of assertions. Changing it changes all 5.

13 essays call it. Every call below passes it something, because a placement that passes nothing draws whichever member of the family the generator happens to default to rather than the one its essay argues about.

What it draws

One picture per question the family answers. Each has a page of its own.

Where it is called

Changing this changes every one of these figures.

Past the five solids: what more faces buy, and what they cost. The icosahedron subdivided 2, 3, 4, 6, 8 ways, giving 20, 80, 180, 320, 720, 1280 faces. The worst angular deformation inside a face falls from 13.1° to 0.26°, with a fitted exponent of -0.947 against the face count — the reciprocal, as it must be, because a face's angular size goes as the inverse square root of the count and the gnomonic's deformation goes as the square of that. The total cut length rises from 11.6 to 96 sphere radii, fitted at 0.509. Both exponents together say the whole economics of the family in one line: halving the distortion costs √2 times the cutting, for ever. The families

More faces, less distortion, more cutting

The five regular solids are where polyhedral mapping stops, and they stop because there are only five rather than for any reason about maps. Subdivide instead, and the family runs to any number of faces with two fitted exponents: distortion falls as the reciprocal of the count and cutting rises as its square root.

The same address length, a tenth of the area. Every cell of a lon/lat quadtree at level 4 carries an identifier of the same length. The heavy curve is each cell's area as a fraction of the largest, against its latitude: a polar cell is 10.2 times smaller than an equatorial one. The light curve is the inverse of the cell's aspect ratio, which falls from 1.00 near the equator to 0.10 at the top — the cells stop being anything like square long before they stop being usable. What a machine does with it

An address is an area

A cell identifier does not name a place, it names a region — so its precision is an area rather than a length. On the obvious lon/lat scheme that area varies by a factor of 10 at level 4 and 163 at level 8, and the factor doubles with every level: the same identifier length means less ground the further north it is used.

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. 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.

Equal area or steady shape, and not both. Four cell schemes plotted by how much their cells vary in area and how far from square the worst of them is. The bottom-left corner is the scheme that has both, and it is empty: the equal-area cube holds area to 1.003 and has the most elongated cells, the tangent-warped cube has the tightest shapes and lets area vary by 1.20, and the lon/lat scheme is off the scale on both. Neither axis can be driven to one while the other stays there. What a machine does with it

A cell system trades area for shape

A grid can hold every cell to exactly the same area or hold every cell nearly square, and the measurement says it cannot do both: the equal-area cube's areas agree to a part in a thousand and its worst cell is 1.29 times as long as it is wide, while the tangent-warped cube holds shape to 1.19 and lets area vary by 20 per cent.

A 6° query against a cube scheme, and the cells it fetches. The cells of a tangent-warped cube scheme at level 5, with the 29 cells a query of 6° radius touches shaded. The disc's own area is 16.84 cells; the count is 29, because every cell the disc's boundary crosses is fetched as well as every cell inside it. In Hilbert order those cells form six contiguous ranges of identifiers, which is six range scans, and the span from the lowest to the highest covers 91 cells against the 29 wanted. Drawn in Mollweide, with the mesh shown only near the query. What a machine does with it

A query is a disc, and a disc is not a cell

Everything a cell system does is an address lookup except the one question anybody actually asks it: find everything within five kilometres of here. That is a disc, and the number of cells it fetches is not its area divided by a cell's — at the radii a query is really made at, it is three to seventeen times that.

Hilbert order on one face, as a curve. The order in which Hilbert numbering visits the 64 cells of one cube face at level 3. The line never leaves a cell without entering one that shares an edge with it — that is what makes it a space-filling curve, and it is why two cells with nearby identifiers are usually near each other on the ground. What a machine does with it

The address is a curve through the sphere

A database does not fetch a set of cells, it reads ranges of identifiers — so the cost of a query is how many runs its cells form, not how many cells it needs. Hilbert order wins that measurement and loses the one usually quoted for it: its neighbouring cells are further apart in identifier than row-major's, on average and at worst.

One field, one round trip between two cell schemes. Left: a stated field binned into an equal-angle grid of 36 by 18 cells. Right: the same field after being rebinned into an equal-area grid of 30 by 15 offset by six degrees of longitude, and rebinned back. Every step is exact area-weighted averaging, the total is preserved to 2 × 10⁻¹⁶, and the root-mean-square difference between the two pictures is 0.144 on a field whose own standard deviation is 0.370. What a machine does with it

The same data on two grids

Five essays have addressed, queried and ordered cells within one scheme and nobody has moved a number between two. Doing it exactly — area-weighted, both directions — preserves the total to 2 × 10⁻¹⁶ and loses 39 per cent of the field's own standard deviation in a single round trip; six round trips leave 23 per cent of its variance. The quantity that would reveal the damage is the one that never moves.

The piece two schemes share, clipped rather than assumed. A cell of a gnomonic cube, whose four edges are great-circle arcs because a straight line on a gnomonic face is one, against a cell of a longitude–latitude grid, whose north and south edges are parallels and are not. Their overlap is neither a rectangle nor a spherical polygon of any standard kind, and it is 5965687 km² of the cube cell's 5965687 km² — 100.0 per cent. Computing it needs the arc of one boundary intersected with the plane of the other, which is three equations and two roots, and it is exact. What a machine does with it

Cells that are rectangles in no coordinate

The previous rung measured what moving a field between two cell schemes costs, and did it between two schemes whose cells are longitude–latitude rectangles — which is what made every overlap a rectangle with a closed-form area. The schemes anybody actually argues about have cells that are rectangles in no coordinate, and their overlaps have to be clipped.

The whole library