Package-level declarations
Types
A scalar field. A contour is found where ShapeFunction crosses zero, with negative values considered "inside" and positive (or zero) values considered "outside".
Functions
Builds an adaptive quadtree over area for shapeFunction, down to maxDepth, collapsing every subtree that turns out to be fully inside or fully outside the shape into a single QuadTree.Full/QuadTree.Empty node.
Find contours for a function f using the marching squares algorithm. A contour is found when f(x) crosses zero.
Finds contours for shapeFunction using an adaptive quadtree and dual contouring, as described in https://www.mattkeeter.com/projects/contours/. Unlike plain marching squares, cells are only subdivided down to maxDepth where the boundary actually needs the extra resolution, and dual vertices are placed on sharp features (corners, thin edges) instead of naive edge midpoints.
Finds contours for shapeFunction over an adaptive quadtree, like findContoursAdaptive, but resolves each straddling leaf independently with plain marching squares instead of dual contouring -- there is no dual vertex, no faceProc-style stitching between cells, just every leaf's own crossingSegments gathered up directly.
Finds the dual graph of this, as described in https://www.mattkeeter.com/projects/contours/: one point per leaf cell (its center), and one polygon for every grid vertex shared by two or more leaves -- a quad where four same-depth leaves meet, or a triangle at a "hanging" T-junction where one coarser leaf borders two finer ones.