How to find vertices with voronoin

7 次查看(过去 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