The head was cut under the chin, the cut closed with a flat disc, and the surface remeshed into 570,130 even triangles, about as fine as the scan itself. Conformalized mean-curvature flow then let it relax into a round sphere without tearing or folding, so every point of the head has an address on the sphere: a latitude θ and a longitude φ. The cut sits at the south pole and the face at longitude 0.
Each coordinate of the head is then a function on the sphere, and each is written as a spherical-harmonic series: x(θ, φ) = Σℓ ≤ L Σm cℓm Yℓm(θ, φ), and the same for y and z. Degree 0 is one point, the centre; degree 1 is the best ellipsoid; every degree after that adds detail about 1/ℓ of the way round the head. To degree L there are 3(L + 1)² numbers. The page rebuilds the series from its coefficients at every L, on 524,290 points, with a Legendre recurrence along each row of latitude and a fast Fourier transform along it.
At any finite L the series is smooth, so it never quite reaches a sharp edge. It overshoots and ripples beside one, Gibbs's effect, most of all at the crease where the flat cut meets the neck. The distance shown is from each point of the series to the scan's point at the same place on the sphere.
The scan: “Plaster – Head of Agrippa”, by michaelxxj on Sketchfab, CC BY 4.0, cut, capped and remeshed here. Coefficients to degree 511 by pyshtools from 523,776 samples on a Gauss–Legendre grid.