How to measure area from voronoi function?

38 vues (au cours des 30 derniers jours)
Jigar
Jigar le 25 Nov 2022
Commenté : Jigar le 3 Déc 2022
I am trying to measure area (also individual's length and width) from voronoi function as all samples are not in same line.

Réponse acceptée

Indra
Indra le 1 Déc 2022
To Calculate Area of a voronoi polygon (and length and width), you need to find out the vertices of voronoi edges. To find the vertices you have to create Delaunay triangulation from the set of points. The vertices of the Voronoi edges are located at the circumcenters of the Delaunay triangles. The Circumcenter function returns a matrix of set of circumcenters. Look into Voronoi Diiagrams for more info.
TR = delaunayTriangulation(P);
C = circumcenter(TR);
To find area of a voronoi polygon you can use convhull function.
[~,area]=convhull(vertices);
  1 commentaire
Jigar
Jigar le 3 Déc 2022
Thank you Indra for your response.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Voronoi Diagram dans Help Center et File Exchange

Produits


Version

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by