Voronoi edges from Delaunay triangulation

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Voronoi edges from Delaunay triangulation

GAD FLY
Hi all,

I apologize if this is a duplicate question, I could not find a clear solution.
I have constructed a Delaunay triangulation from a set of random points in 2D, and now I'd like to build the Voronoi graph from this network. My question is how to find the vertex handles for the Voronoi graph also how to find if there is an edge between two Voronoi vertices?
I've seen a function dual(face handle) which gives just the location of a Voronoi vertex and I don't know how to use is_edge() function on the Voronoi graph which is derived from a Delaunay triangulation.

Thank you for your help,
James

Reply | Threaded
Open this post in threaded view
|

Re: Voronoi edges from Delaunay triangulation

MaelRL

Hello,

Please look into the Voronoi_diagram_2 package ( https://doc.cgal.org/latest/Voronoi_diagram_2/ ). This package provides a Voronoi adapter around your triangulation, and you'll be able to traverse vertices (using vertices_begin()/end()). To check if an edge exists between two Voronoi vertices, you can just check the halfedges incident to a given vertex with incident_halfedges().

Best,
Mael

On 13/08/18 17:27, GAD FLY wrote:
Hi all,

I apologize if this is a duplicate question, I could not find a clear solution.
I have constructed a Delaunay triangulation from a set of random points in 2D, and now I'd like to build the Voronoi graph from this network. My question is how to find the vertex handles for the Voronoi graph also how to find if there is an edge between two Voronoi vertices?
I've seen a function dual(face handle) which gives just the location of a Voronoi vertex and I don't know how to use is_edge() function on the Voronoi graph which is derived from a Delaunay triangulation.

Thank you for your help,
James