Subject: CGAL users discussion list
List archive
- From: pbarletta <>
- To:
- Subject: [cgal-discuss] Voronoi from Delaunay (3D)
- Date: Thu, 7 Jul 2016 05:45:29 -0700 (PDT)
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=SoftFail ; spf=None
- Ironport-phdr: 9a23:jlohwByS3JvpUabXCy+O+j09IxM/srCxBDY+r6Qd0e4QIJqq85mqBkHD//Il1AaPBtSDragUwLeH+4nbGkU4qa6bt34DdJEeHzQksu4x2zIaPcieFEfgJ+TrZSFpVO5LVVti4m3peRMNQJW2WVTerzWI4CIIHV2nbEwud7yzQN6Z0pX//tvx0qWbWx9Piju5bOE6BzSNhiKViPMrh5B/IL060BrDrygAUe1XwWR1OQDbxE6ktY+G1cU9omEJ47phrJYYEPayQ6NtRrNRCHEqMns++dbwnRjFVwqGoHUGAUsMlR8dGwLM9hX3Qov4+n/ivONn3CSGIcTeQrU9WDDk5KBuHky7wBwbPiI0pTiEwvd7i7hW9Un5/xE=
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.
- [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.