How can I get the vertices of each polygon of a Voronoi diagram?

13 次查看(过去 30 天)
Hi all, For the following image;
How can I get the vertices (which are highlighted by orange dots) of each Voronoi polygon of the following Voronoi diagram?
The picture is from the Internet. It is just for illustration.
Any suggestions for code to get these vertices?

采纳的回答

KSSV
KSSV 2018-7-20
x = gallery('uniformdata',[1 10],0);
y = gallery('uniformdata',[1 10],1);
[vx,vy] = voronoi(x,y);
plot(x,y,'r+',vx,vy,'b-')
axis equal
(vx,vy) are the vertices you want.
  1 个评论
Karishma q
Karishma q 2019-5-14
How do I get the co-ordinates of each polygon separately? I tried adding a for loop which defines the number of regions, but I am still getting the vertices of the last region. Also [vx, vy]=voronoi(x,y) provides all the coordinates, I want for the individual regions. Can you help me on this?

请先登录,再进行评论。

更多回答(0 个)

类别

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

标签

Community Treasure Hunt

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

Start Hunting!

Translated by