A parametric cubic represents a planar curve with separate cubic coordinate functions, x(t) and y(t). In contour reconstruction, it replaces a straight segment with a smooth path guided by endpoint positions and tangent information. section 11.4.1 section 12.4.5
Build a smooth contour in three practical stages:
- Find an initial border where neighboring grid or pixel samples have opposite signed-distance values. section 11.4.3 section 12.4.5
- Fit each border vertex toward the target isoline by moving along the inverted gradient according to the function value. section 11.4.1 section 12.4.5
- Solve two four-equation systems per segment, using endpoint coordinates and partial derivatives to determine the x and y cubic coefficients. section 11.4.1 section 11.4.3
Image contour reconstruction
A smooth interpolated pixel function supplies a quasi-SDF. After fitting an initial pixel-border contour to its threshold isoline, tangent vectors define cubic replacements for the segments; splitting each curve into 16 short line segments makes plotting convenient. section 12.4.5
Inspect the resulting smooth contour made from cubic polynomial pieces. section 12.4.5
