How to find intersection points in a given voronoi diagram

Viewed 522

I'm trying to code an algorithm where the code finds the intersection points in a voronoi diagram. How do I get started?

I know only how to plot the voronoi diagram.

Below is an example.

Coordinates of the blue circle's intersection points

enter image description here

code from the voronio function's documentation

x = gallery('uniformdata',[1 10],0);

y = gallery('uniformdata',[1 10],1);

voronoi(x,y)

The code should detect any type of graph's intersection points and not just the results from the example code.

1 Answers

Use

[vx,vy] = voronoi(x,y)

for the Voronoi edges, or

[v,c] = voronoin([x(:) y(:)])

to also get the connectivity with each cell.

This is basically copy-paste from the respective Matlab documentation.

Related