Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Circulate convex hull edge and get the corresponding Voronoi rays

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Circulate convex hull edge and get the corresponding Voronoi rays


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Circulate convex hull edge and get the corresponding Voronoi rays
  • Date: Fri, 24 Aug 2018 13:24:14 +0200
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:f6cxJRBPKIT5RZ//StIVUyQJP3N1i/DPJgcQr6AfoPdwSPT/oMbcNUDSrc9gkEXOFd2Cra4c1KyO6+jJYi8p2d65qncMcZhBBVcuqP49uEgeOvODElDxN/XwbiY3T4xoXV5h+GynYwAOQJ6tL1LdrWev4jEMBx7xKRR6JvjvGo7Vks+7y/2+94fcbglUhjexe69+IAmrpgjNq8cahpdvJLwswRXTuHtIfOpWxWJsJV2Nmhv3+9m98p1+/SlOovwt78FPX7n0cKQ+VrxYES8pM3sp683xtBnMVhWA630BWWgLiBVIAgzF7BbnXpfttybxq+Rw1DWGMcDwULs5Xymp4aV2Rx/ykCoJKiA38G/XhMJzgqxUrh2uqB5jzIDbe4yVKPhzc7nBcd8GS2dMXMBcXDFBDIOmaIsPCvIMMehFoYbjvFQBtwC+BRWtBOzxzD9Dm3n43aog0+QgFgHGwBErE9YPvnvKq9X1MbkdUfyvzKjIzTvMde9Z2Sv66IjSchEtpP+AVq93fMrKzUkvEBnFjlSXqYz5JT+V0+ANvnOU7+plT+2vimonpxttrTiow8chk4/EjZ8bxFDD8CV22oc1JdugRU59e9GrC4BftyWEOIdsXswiRGRotSAnwbMFoZ62ZDYGxIgjyhLFaPGKc5KE7gz9WOqMOzt1i3JodKq9ihux60Ss1OLxW8iu3FpXqidInMPAu3IN2hHV98OJUOFy/l271jaKzw3T6v9LIUQzlafDLp4u2L8wlp4KvUXNBC/6hVz6jKGZe0gk4OSo5OPnYrLppp+YKYB4kB3xMqMrmsCnAOQ4NBYBX3SD9OiiyLHu+Vf1TbZKg/EsjKXVro3WKd4Uq6O5GwNV15ws6xe7DzeoytQYmnwHIUpeeBKDiIjpIVDOIPfkDfulhlSslCxmx//DPrL7A5XNKmLPn6vmfbZ480Jc0hY8zchD55JIDbEMOO78WkDru9zcFxM2Lg20w/37B9VgzYMeQnmCArSZMaPXqV+H/PgjI+iKZI8PuTbyMeIp5/D0jSxxpVhIdqag2d4baWuzA+99C0Sfe3vlxNkbQkkQuQ9rBtfnglSZTT9eYT6WWLg94S1zSK2rCoLOWpq8rrWKwCChD9wcLjRdDleWEHD0MYCAc/gJYSOWZMRml2pXBvCaV4Y92ET250fBwL19I7+Mo3xKhdfYzNFwotbru1Q3/D1wAd6a1jjUHW5xl2IMATQx2fIm+BAv+hK4yaF9xsdgO5lL/foQC1U1MJfdy6pxDNWgAlucLOfMc06vR5CdOR90Tt81xIVTMUN0GtHnkQqamiT2XvkakLuEAJFy+aXZjSD8

IIUC what you want, you want to get the edge opposite to the infinite vertex.

Something like the following should work:

DT::Face_handle fh = XXX;
DT::Vertex_handle v_inf = dt.infinite_vertex();
DT::Edge opp_edge(fh, fh->index(v_inf));

Sebastien.


On 08/23/2018 11:46 AM, brainslush wrote:
I have a convex polygon or a convex hull as input data for a Delaunay
triangulation and want to get the voronoi circle center or ray for the
convex hull edges.
I know that I can get the rays of the hull using

auto eit = hullDt.edges_begin();
for ( ; eit !=hullDt.edges_end(); ++eit) {
CGAL::Object o = hullDt.dual(eit);
if (auto _el = CGAL::object_cast<K::Ray_2>(&o)) {
// do some magic
}
}

but this approach returns them unordered and the corresponding hull segment
(eit) in "arbitrary" directions as we are visiting not the infinite face but
the one adjacent and inside the polygon to it.

So I thought I could use the circulator

hullDt.incident_faces(hullDt.infinite_vertex());

and determine the adjacent face inside the hull or the inside edge of the
hull segment which I then pass to

hullDt.dual(insideFace);

which then should give me what I want, right?
The only thing I don't know how I find the adjacent face/edge. I probably
would find it eventually but maybe someone more familiar with the code knows
the right functions.

Thanks



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/




Archive powered by MHonArc 2.6.18.

Top of Page