Hi all, I have the following code to draw hexagonal grid.
Rad3Over2 = sqrt(3) / 2;[X Y] = meshgrid(-.2:0.2:1.6);n = size(X,1);X = Rad3Over2 * X;Y = Y + repmat([0 0.5],[n,n/2]);% Plot the hexagonal mesh, including cell borders
[XV YV] = voronoi(X(:),Y(:)); plot(XV,YV,'b-')axis equal, axis([.2 1.2 .2 1]), zoom on
My question is:
How to distribute uniform number of points into each hexagonal (for example, 4 points into each hexagonal)?
Thanks in advance.
Best Answer