How to measure area from voronoi function?
47 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I am trying to measure area (also individual's length and width) from voronoi function as all samples are not in same line.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1207393/image.png)
0 Kommentare
Akzeptierte Antwort
Indra
am 1 Dez. 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);
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Voronoi Diagram finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!