1

所以 Scipy Voronoi 算法在我的应用程序中效果相对较好。在 3D 情况下,给定的多边形由其面指定。但是,Voronoi 算法不会按照从顶点到边、然后到面、再到多边形的层次顺序生成数据。它仅包含多边形包含的脊的数据。如何获得构成面的脊索引列表,以及由此构成多边形的面索引列表?Python中Voronoi算法的详细输出:

points  (ndarray of double, shape (npoints, ndim)) Coordinates of input points.
vertices    (ndarray of double, shape (nvertices, ndim)) Coordinates of the Voronoi vertices.
ridge_points    (ndarray of ints, shape (nridges, 2)) Indices of the points between which each Voronoi ridge lies.
ridge_vertices  (list of list of ints, shape (nridges, *)) Indices of the Voronoi vertices forming each Voronoi ridge.
regions (list of list of ints, shape (nregions, *)) Indices of the Voronoi vertices forming each Voronoi region. -1 indicates vertex outside the Voronoi diagram.
point_region    (list of ints, shape (npoints)) Index of the Voronoi region for each input point. If qhull option “Qc” was not specified, the list will contain -1 for points that are not associated with a Voronoi region.

干杯。

4

0 回答 0