Subject: CGAL users discussion list
List archive
- From: Monique Teillaud <>
- To:
- Subject: Re: [cgal-discuss] Voronoi from Delaunay (3D)
- Date: Thu, 7 Jul 2016 18:39:56 +0200
Hi
What do you want to do with the Voronoi diagram? If you just need to visualise it, it is easier to iterate on facets and draw their dual.
You could have a look at function draw_dual in Delaunay_triangulation_3.h
(indeed, the cells won't "show up in order” in the iterator, since there is no natural order for cells incident to a given vertex in 3d)
best,
--
Monique Teillaud
https://members.loria.fr/Monique.Teillaud/
INRIA Nancy - Grand Est, LORIA
Institut National de Recherche en Informatique et Automatique
https://members.loria.fr/Monique.Teillaud/
INRIA Nancy - Grand Est, LORIA
Institut National de Recherche en Informatique et Automatique
Hi!
I know this is probably a FAQ, but I'm new to CGAL and all the other
related posts didn't go into enough detail for me to understand.
I've successfully computed the Delaunay triangulation of a set of ~150
points (I expect this number to go as high as 10 000) with the EPEC kernel
in 3d. Now I need to get the corresponding Voronoi diagram with each Voronoi
cell somehow associated to its corresponding point, so I can process this
info later.
I tried iterating over every vertex of my Delaunay triangulation and
then iterating over every incident cell to this vertex to get the
circumcenter of every cell. I figured that connecting each circumcenter as
they appeared would give me the corresponding Voronoi cell. The code looks
(somewhat) like this:
// T is the triangulation
*for(fv_ite = T.finite_vertices_begin(); fv_ite != T.finite_vertices_end();
fv_ite ++) {
T.incident_cells(fv_ite, std::back_inserter(incident_cell));
ite_incident_cell = incident_cell.begin();
c_han = *ite_incident_cell;
for( ite_incident_cell = incident_cell.begin(); ite_incident_cell !=
incident_cell.end(); ite_incident_cell++ ) {
T.dual(c_han);
//some other stuff
}
}*
But it turns out that incident cells don't show up in order, and when I
connect the circumcenters I get a doodle. I also tried *dual_support()* and
*draw_duall()* but the resulting diagram is a mess of unconnected lines, not
cells. Also I need to bound the Voronoi diagram and the segments make this
difficult.
I know this is probably an easy task, but I just can't get it done.
Hope you guys can give me a hand.
--------------------------------------------------------------------------------------------------------------------------------------------
I'm attaching 2 images obtained with pymol. The green sphere is the
first vertex, the red lines are the incident cells edges, the light blue
spheres are the circumcenters connected by light blue lines in the order
they appeared.
<http://cgal-discuss.949826.n4.nabble.com/file/n4662044/delaunay%2Bvoronoi%2Batom.png>
<http://cgal-discuss.949826.n4.nabble.com/file/n4662044/delaunay%2Bvoronoi.png>
--
View this message in context: http://cgal-discuss.949826.n4.nabble.com/Voronoi-from-Delaunay-3D-tp4662044.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss
- [cgal-discuss] Voronoi from Delaunay (3D), pbarletta, 07/07/2016
- Re: [cgal-discuss] Voronoi from Delaunay (3D), Monique Teillaud, 07/07/2016
- Re: [cgal-discuss] Voronoi from Delaunay (3D), Patricio German Barletta Roldan, 07/07/2016
- Re: [cgal-discuss] Voronoi from Delaunay (3D), Patricio German Barletta Roldan, 07/09/2016
- Re: [cgal-discuss] Voronoi from Delaunay (3D), Patricio German Barletta Roldan, 07/07/2016
- Re: [cgal-discuss] Voronoi from Delaunay (3D), Monique Teillaud, 07/07/2016
Archive powered by MHonArc 2.6.18.