circle_utils#

Smallest enclosing circle and convex hull area for complex-valued point sets.

matviz.circle_utils.cget_area(z)[source]#

Compute the convex hull area of complex-valued points.

Parameters:
zcomplex array-like

Points as complex numbers (real=x, imag=y). NaN values are removed.

Returns:
float

Convex hull area, or 0 if fewer than 4 unique points.

matviz.circle_utils.cmake_circle(z)[source]#

Find the smallest enclosing circle, returning complex center and radius.

Parameters:
zcomplex array-like

Points as complex numbers. NaN values are removed.

Returns:
z_centercomplex

Center of the enclosing circle.

rfloat

Radius.

matviz.circle_utils.cmake_circle2(z)[source]#

Find the smallest enclosing circle, returning [x, y, r].

Parameters:
zcomplex array-like

Points as complex numbers. NaN values are removed.

Returns:
list of [float, float, float]

[center_x, center_y, radius].

matviz.circle_utils.is_in_circle(c, p)[source]#
matviz.circle_utils.make_circle(points)[source]#
matviz.circle_utils.make_circumcircle(a, b, c)[source]#
matviz.circle_utils.make_diameter(a, b)[source]#
matviz.circle_utils.remove_nans(z)[source]#