How do i get all the vertices of the polygons in Voronoi 2D plot.
조회 수: 1 (최근 30일)
이전 댓글 표시
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.
댓글 수: 0
답변 (1개)
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
참고 항목
카테고리
Help Center 및 File Exchange에서 Voronoi Diagram에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!