Skip to main content

Module marching_squares

Module marching_squares 

Source

Functionsยง

extract_contours
Extract contour line segments from a regular grid at specified level thresholds. Returns vectors of (x, y, level, group_id) for each segment endpoint.
frac
Interpolation fraction for threshold crossing between v0 and v1.
lerp
Linear interpolation between two values.
marching_squares_segments
Return line segments for a marching squares cell. Corners: tl=top-left, tr=top-right, br=bottom-right, bl=bottom-left.