117. plugins.scipy_itf — Interface with SciPy.

This module provides an interface with some functions of the SciPy library. Documentation for Scipy can be found on http://scipy.org/scipylib/index.html.

Note that while NumPy (also a Scipy project) is required for pyFormex, the full SciPy package is not. There are however some functions of the SciPy library that can be made to good use. If you have SciPy installed, you will have these extended functionalities. On Debian/Ubuntu-likes install package ‘python3-scipy’.

117.1. Functions defined in module plugins.scipy_itf

plugins.scipy_itf.convexHull(points)[source]

Return the convex hull of a set of points.

Parameters:

points (float array (npoints, 2|3)) – A set of 2D or 3D point coordinates.

Returns:

Connectivity – A Connectivity table with the indices of the points that constitute the convex hull of the given point set. The convex hull is the minimal set of simplices enclosing all the points. For a 3D convex hull, the Connectivity will have plexitude 3 and an eltype ‘tri3’, while for 2D convex hulls, the Connectivity has plexitude 2 and eltype ‘line2’.

Notes

This requires SciPy version 0.12.0 or higher.

If scipy.spatial.ConvexHull() raises an error, an empty Connectivity is returned. This happens if all the points of a 3D set are in a plane or all the points of a 2D set are on a line.