【问题标题】:Voronoi Diagram ExplanationVoronoi 图说明
【发布时间】:2021-10-04 19:13:48
【问题描述】:

我正在尝试生成 Voronoi 分割多边形,但无法理解 Voronoi 的 Scipy 实现中的参数“furthest_site=True”。

从 scipy.spatial 导入 Voronoi, voronoi_plot_2d

points = np.array([[0, 0], [0, 1], [0, 2], [1, 0], [1, 1], [1, 2], [2, 0], [2, 1], [2, 2]])

vor = Voronoi(points,furthest_site=True)

将 matplotlib.pyplot 导入为 plt

fig = voronoi_plot_2d(vor) plt.show()

这给了我输出:

属性“furthest_site=True”的解释是什么

【问题讨论】:

    标签: scikit-learn voronoi scipy-spatial


    【解决方案1】:

    scipy 说它使用 QHull 来计算 voronoi 图,他们有这个in their documentation:

    最远点 Voronoi 图是一组点的最远邻图。每个区域都包含比任何其他输入站点离一个输入站点更远的点。

    最远(或“最远”)站点图在许多其他地方都有描述,包括示例图;例如,在其他 stackexchange 帖子中:1、2。

    您的情节看起来很奇怪,因为您的点集有些退化;只有四个角点可以作为最远的参考点。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-11-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-12-29
      • 1970-01-01
      相关资源
      最近更新 更多