How to measure area from voronoi function?

40 次查看(过去 30 天)
I am trying to measure area (also individual's length and width) from voronoi function as all samples are not in same line.

采纳的回答

Indra
Indra 2022-12-1
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);

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Voronoi Diagram 的更多信息

标签

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by