How can I have the Centroidal Voronoi tessellation according to Lloyd's algorithm ?
Mostra commenti meno recenti
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 ?
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Voronoi Diagrams in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!