Voronoi Diagram Boundaries with a given width
19 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I had a problem with Voronoi function now. I wish that I can remain a width, say, x(a variable) for each grid.Here is my code but that's wrong. Attached please find a pic that exactly shows what I want to do with Voronoi Diagram.
A = [3,7,2,8,5];
B = [6,1,0,8,1];
x=2;
Voronoi(A,B,"LineWidth",x);
There is a pic telling what I need.
1 commentaire
Bruno Lopes
le 20 Fév 2022
A good option for voronoi is the following code: https://it.mathworks.com/matlabcentral/fileexchange/34428-voronoilimit-varargin
It is the best code I found on the internet. It is really complete.
Réponse acceptée
KSSV
le 27 Juin 2019
A = [3,7,2,8,5];
B = [6,1,0,8,1];
x=2;
h = Voronoi(A,B);
for i = 1:length(h)
h(i).LineWidth = x ;
end
Plus de réponses (1)
Preetham Manjunatha
le 8 Fév 2022
Modifié(e) : Preetham Manjunatha
le 8 Fév 2022
If I understand your problem correctly, are you looking to bound the Voronoi region? If so, here is the link function to clip the extending edges of the Voronoi Diagram for rectangular or square region. Rigorously tested on the random points, this function can process an input data set of 2000 seed points in 2D in about 0.015 seconds on average.
0 commentaires
Voir également
Catégories
En savoir plus sur Voronoi Diagram dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!