scalarfield_contours

compas.numerical.scalarfield_contours(xy, s, levels=50, density=100)[source]

Compute the contour lines of a scalarfield.

Parameters:
xyarray-like

The xy-coordinates at which the scalar field is defined.

sarray-like

The values of the scalar field.

levelsint, optional

The number of contour lines to compute. Default is 50.

Returns:
tuple

A tuple of a list of levels and a list of contour geometry.

The list of levels contains the values of the scalarfield at each of the contours. The second item in the tuple is a list of contour lines. Each contour line is a list of paths, and each path is a list polygons.