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

16 ビュー (過去 30 日間)
Eman S
Eman S 2018 年 7 月 12 日
コメント済み: Rena Berman 2020 年 5 月 14 日
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?
  2 件のコメント
KSSV
KSSV 2018 年 7 月 13 日
How you got this image? YOu plotted using inbuilt function? Or you have a image and you want to get points from the image?
Rena Berman
Rena Berman 2020 年 5 月 14 日
(Answers Dev) Restored edit

サインインしてコメントする。

採用された回答

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 Center および File ExchangeVoronoi Diagram についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by