Skip to content

Documentation

The SDK extracts topologically ordered contour curves and filled contour bands from 2D scalar grids using an output-sensitive sweep algorithm. The core is a C11 library with no third-party dependencies; the Python package and the isosweep-contour command-line tool wrap the same library. The SDK is commercial software, delivered as binaries with an evaluation or licence — request an evaluation.

import numpy as np
import isocurves
z = np.random.rand(1024, 1024) # any 2D scalar field
result = isocurves.contour(z, levels=[0.3, 0.5, 0.7])
for curve in result:
curve.x, curve.y # ordered vertex arrays
curve.level_value # the iso-value
curve.is_closed # closed loop vs open (exits the grid)
curve.is_hill # higher values inside?

Curves arrive ordered, closed where the field closes them, and topology-tagged — there is no stitching or ring-assembly step. See the output format for what the topology metadata means and why it exists.