spatialTransformField edit page

a displacement measured at scattered points and interpolated between them

The free form transform: no model, just where things moved. Used to mop up whatever structure a fitted model leaves in its residual, and as the common currency any chain can be collapsed into by discretize.

The sample points need not lie on a grid and the query points need not either, so a field fitted on one data set can be evaluated on another. Interpolation is natural neighbour, extrapolation linear.

Coordinates are normalised before interpolating, because natural neighbour weights come from a Delaunay triangulation and that is not scale invariant - a frame far wider than it is tall would otherwise get sliver triangles. The displacements themselves need no normalising: the weights do not depend on them.

Syntax

T = spatialTransformField(pos,u)
T = spatialTransformField.fit(posA,posB)

Input

pos vector3d, where the displacement was measured
u vector3d, the displacement there
posA, posB vector3d, the same points in the two frames

Output

T spatialTransformField
There is deliberately no smooth: tools/math_tools/smoothn is for gridded data, and applying it to scattered samples in storage order smooths along the index rather than across the frame, which collapses the field to its mean. Smoothing a scattered field needs a regularised scattered fit.

Class Properties

pos vector3d, the sample points
u vector3d, the displacement at each

See also

spatialTransform spatialTransform spatialTransformDrift