Least-squares control points of samples at uniform phases.
The samples must number a multiple of N. Then every control point sees
the same pattern of samples, the normal matrix is circulant, and the
system is solved exactly in its discrete Fourier basis in O(N^2).
With a cutoff, the fit is a penalized spline (P-spline): the squared
second differences of the control points are added with the weight at
which a sinusoid of cutoff cycles per section keeps half its
amplitude. Longer waves pass almost unchanged, shorter ones (the source
mesh's facets) are suppressed, and the response falls smoothly, so the
frequency response is smooth. That response alone is not a proof against
spatial overshoot or ringing in the fitted curve.
Parameters
samples: readonly (readonly[number,number])[]
Points [x, z] at phases 2pi m / M, m = 0 .. M-1.
count: number
Number of control points N.
Optionalcutoff: number
Half-response frequency in cycles per section; omitted,
plain least squares.
Least-squares control points of samples at uniform phases.
The samples must number a multiple of N. Then every control point sees the same pattern of samples, the normal matrix is circulant, and the system is solved exactly in its discrete Fourier basis in O(N^2).
With a cutoff, the fit is a penalized spline (P-spline): the squared second differences of the control points are added with the weight at which a sinusoid of
cutoffcycles per section keeps half its amplitude. Longer waves pass almost unchanged, shorter ones (the source mesh's facets) are suppressed, and the response falls smoothly, so the frequency response is smooth. That response alone is not a proof against spatial overshoot or ringing in the fitted curve.