How to find vertices with voronoin
Show older comments
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?
Answers (0)
Categories
Find more on MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!