class scipy.spatial.ConvexHull(points, incremental=False, qhull_options=None)
参数:
points:ndarray of floats, shape (npoints, ndim)
从中构造凸包的点的坐标
incremental:bool, 可选参数
允许增量添加新点。这会占用一些额外的资源。
qhull_options:str, 可选参数
传递给Qhull的其他选项。有关详细信息,请参见Qhull手册。 (对于ndim> 4,默认值为:“Qx”,否则为“”。)选项“Qt”始终启用。
属性
points:ndarray of double, shape (npoints, ndim)
输入点的坐标。
hull.vertices
vertices:ndarray of ints, shape (nvertices,)
形成凸包的顶点的点的索引。对于二维凸包,顶点按逆时针顺序排列。对于其他尺寸,它们按输入顺序排列。
hull.simplices
simplices:ndarray of ints, shape (nfacet, ndim)
形成凸包的简单面的点的索引。
neighbors:ndarray of ints, shape (nfacet, ndim)
每个构面的相邻构面的索引。第k个邻居与第k个顶点相反。 -1表示没有邻居。
equations:ndarray of double, shape (nfacet, ndim+1)
[法线,偏移]形成构面的超平面方程(请参阅Qhull文档了解更多)。
coplanar:ndarray of int, shape (ncoplanar, 3)
共面点的索引以及最近的小平面和最近的顶点索引的相应索引。共面点是由于数值精度问题而未包括在三角剖分中的输入点。
如果未指定选项“Qc”,则不计算此列表。
hull.good
good:ndarray of bool 或 None
一维布尔数组,指示哪些构面是好的。与计算良好构面的选项一起使用,例如QGn和QG-n。好的方面定义为从点n开始可见(n)或不可见(-n)的方面,其中n是‘points’中的第n个点。 ‘good’属性可用作‘simplices’的索引,以返回良好(可见)构面:简单[good]。刻面仅在船体外部可见,并且共面性和退化都不能视为可见性。
如果未指定“QGn”或“QG-n”选项,则不返回任何值。
area:float
凸包的面积。
volume:float
凸包的体积。