How do i get all the vertices of the polygons in Voronoi 2D plot.

1 回表示 (過去 30 日間)
Matthew
Matthew 2016 年 5 月 27 日
コメント済み: KSSV 2016 年 5 月 31 日
I am looking for a way to get all the vertices of Voronoi plot, I know i can use this:
[v,c] = voronoin([x(:) y(:)])
This will provide the index of the vertices for each polygon and the positions of each. This will also identify the finite vertices. But what I am looking for is the point positions where there is no vertices, but where the polygon line crosses the defined figure axis. IS this possible?
Thank you.

回答 (1 件)

KSSV
KSSV 2016 年 5 月 27 日
Where ever the length of c{i} is less it is not closed....Check for each length of c{i} and use nearest neighbor to get the points you wanted. You may use knnsearch for nearest points. Hope this helps.
  2 件のコメント
Matthew
Matthew 2016 年 5 月 31 日
Thank you, but if you look at the attached figure. The positions i am looking to extract are the ones in green. I can kind get the corners, but i need to know which point belong to each polygon. DO you think there is a way to do this?
KSSV
KSSV 2016 年 5 月 31 日
Yes can be done.....attach your code here....

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

カテゴリ

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