vedo icon indicating copy to clipboard operation
vedo copied to clipboard

Plotting voronoi diagram in vedo

Open DeepaMahm opened this issue 2 years ago • 2 comments

Hello @marcomusy,

Could we create voronoi diagram in vedo by specifying the coordinates or indices of the lattice points of cell boundaries detected in images?

I've tried this before by specifying just the coordinates of centroids. But I am not sure how to specify the point region enclosed by the boundary of each Voronoi cell.

Sample image : please see link

DeepaMahm avatar Dec 14 '22 12:12 DeepaMahm

Hello :)

I guess it's possible with a bit of work from the Delauney triangulation which is the dual of Voronoi: https://en.wikipedia.org/wiki/Delaunay_triangulation

you can use delauney2d(...), then use cell_centers() to get the voronoi seeds.

marcomusy avatar Dec 14 '22 14:12 marcomusy

Hello :) Thanks a lot, I will try this out.

DeepaMahm avatar Dec 14 '22 16:12 DeepaMahm