How can I have the Centroidal Voronoi tessellation according to Lloyd's algorithm ?
이전 댓글 표시
I want to find the Centroidal Voronoi but I have been confused . For instance lets say that I have two vectors 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]; I use the command voronoi(X,Y) in order to have the diagram (see the attachment) . How can I have the Centroidal Voronoi tessellation according to Lloyd's algorithm ? I have found the Lloyd's algorithm in the internet :
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
but I can't understand what I have to do in order to write the code and take the Centroidal Voronoi in matlab. Any ideas or alternatives please ?
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Voronoi Diagrams에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!