Quad corner vertex indices, with consistent manifold winding as a caller premise. stencilAutoMovieSubdivisionLimit checks quad cardinality, integer index range, unused vertices and zero/two boundary edges per vertex; it does not certify full manifoldness. Inputs are borrowed only during the call.
OptionalpinnedTrue holds that vertex's control at its target rather than solving its limit point. Missing entries, including an omitted mask, mean false; surplus entries are ignored.
Packed XYZ limit targets in one common frame and length unit, metres for surface networks. Length must be divisible by three; the wrapper checks packing but does not check finite coordinates. An empty cage has empty output and zero residual.
Solve control positions of a quad cage whose Catmull-Clark limit surface passes through given targets, one per vertex.
The limit point of a cage vertex is a fixed linear combination of the vertex and its one-ring. An interior vertex of valence
ngoes to(n^2 P + 4 sum E + sum D) / (n (n + 5)), its edge neighboursEand the opposite cornersDof its quads (Halstead, Kass and DeRose 1993, SIGGRAPH, "Efficient, fair interpolation using Catmull-Clark surfaces"); a boundary vertex, whose boundary is an infinitely sharp crease, goes to(A + 4 P + B) / 6along its two boundary neighbours, the cubic B-spline limitsubdivideAutoMovieSurfacegives boundaries. Interpolation is the linear systemL P = T. It is solved by Jacobi iterationP <- P + (T - L P)fromP = T, which converges when every eigenvalue ofLlies between 0 and 2; on a regular grid they lie between 1/9 and 1, for admitted regular topology the stencil weights form convex combinations. It stops when the largest residual falls below 1e-10 of the targets' extent or after 2,000 sweeps, and returns the last measured residual, so a caller can refuse a fit that did not converge.Pinned vertices keep their target as their control position and are not solved, which is how a cage meets a fixed junction ring exactly: their limit points then depend on the cage around them.