【发布时间】:2015-06-24 05:52:09
【问题描述】:
我想找到 Centroidal Voronoi 但我一直很困惑。例如,假设我有两个向量
X=[1 2 1.1 1.3 1.4 1.5 1.3 1.2 1.8 2.1 2.2]; and
Y=[1.5 1.3 1.5 1.8 1.4 1.6 2.5 2.3 2.4 1.1 1.8];
我使用命令 voronoi(X,Y) 来获得图表(见附件)。我怎样才能根据劳埃德算法进行质心 Voronoi 镶嵌?我在网上找到了劳埃德算法:
while generating points xi not converged to centroids do
Compute the Voronoi diagram of xi
Compute the centroids Ci using equation (1)
Move each generating point xi to its centroid Ci
end while
但我不明白我必须做什么才能编写代码并在 matlab 中获取 Centroidal Voronoi。请问有什么想法或替代方案吗?
【问题讨论】:
-
“见附件”?