How to get a voronoi diagram's edges and their associate sites in MATLAB? -
i created voronoi diagram. want store every border , 2 associated sites. example, got diagram following:
say want store border (v4, v5) , associate sides, x3 , x8.
i used
[vx,vy] = voronoi(x(:,1),x(:,2)); to create voronoi diagram. utilize vx , vy edges. however, not know how edge's associate sides. in other words, can border (v4, v5), have no thought accomplish associate sites,x3 , x8, , create border (v4, v5) pointed x3 , x8.
could give me ideas please?
thanks much!
you can utilize c array of voronoi cells (see here http://www.mathworks.nl/help/matlab/ref/voronoin.html)
[v,c] = voronoin(x) you can utilize (see exmple here http://www.mathworks.nl/help/matlab/math/voronoi-diagrams.html)
dt = delaunaytriangulation(x); [v,r] = voronoidiagram(dt) matlab
No comments:
Post a Comment