← Jake Popham

Inferring subgrid structure from k-jets

Every derivative you keep with a sample buys two more orders of accuracy between the samples.

A simulation stores fields on a grid, and the grid is always too coarse somewhere. The naive floor is pure quantization: copy the nearest node's value and live in a piecewise-constant world — first order in the spacing. Interpolating the stored values (the 0-jet) buys second order, but everything between nodes is still a straight line. Carrying the k-jet instead — the value and first k derivatives — pins the field's local Taylor data at every node, and the unique degree-(2k+1) polynomial matching both ends of a cell is the piecewise Hermite interpolant: cubic at first order, quintic at second, septic at third.

The derivatives here are exact, computed from the true function by Taylor-jet arithmetic — the point is what each extra jet order buys, not how you obtain it. Reconstruction error converges as h2k+2, with the nearest-neighbor floor at plain h: every derivative kept per sample is worth two more orders. The error strip below the chart is logarithmic — each jet order drops the curve by a roughly constant factor, and the factor itself grows as the grid refines. The stat tiles show the gain of each order over the previous one. The chirp preset shows the honest limit: once a wavelength fits entirely inside a cell, no local jet of any order can recover it.

The 2D version sends a compact feature diagonally across a coarse grid — bilinear values against bicubic tensor-product jets, peak snapping against peak gliding.

Categorical fields can't be interpolated at all — part two keeps the grid and changes the payload: a label per cell versus a signed distance sample, which encodes interface positions at subvoxel accuracy.