How to find vertices with voronoin

5 ビュー (過去 30 日間)
Nurul
Nurul 2011 年 4 月 11 日
Hi guys,
I have one problem finding vertices of hexagonal cell. I created the hexagonal cell using meshgrid and voronoi like in this link. http://matlabdatamining.blogspot.com/2008/04/generating-hexagonal-grids-for-fun-and.html.
The problem is i failed to find the vertices of some cells located in the middle of the figure. I want to use the vertices to use the function of patch in order to fill the cells with color.
I already use voronoin function but failed to define the vertices.
As i put [v,c] = voronoin([X(:) Y(:)]), it will color all the hex cell. Then, i use [v,c] = voronoin([X(4) Y(4)]), but there're errors because it cannot define the vertices of cell number 4. How can i fix that?

回答 (0 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by