Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Iteration over Voronoi faces

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Iteration over Voronoi faces


Chronological Thread 
  • From: Mael <>
  • To:
  • Subject: Re: [cgal-discuss] Iteration over Voronoi faces
  • Date: Mon, 17 Jun 2019 08:57:45 +0200
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=None ; spf=None
  • Ironport-phdr: 9a23:84U4BxHD+tbghvTutHy0vJ1GYnF86YWxBRYc798ds5kLTJ7ypsiwAkXT6L1XgUPTWs2DsrQY0rOQ6v6+EjVYsd6oizMrSNR0TRgLiMEbzUQLIfWuLgnFFsPsdDEwB89YVVVorDmROElRH9viNRWJ+iXhpTEdFQ/iOgVrO+/7BpDdj9it1+C15pbffxhEiCCybL9vMRm6txjdu8gXjIdtN6o91hjEqWZUdupLwm9lOUidlAvm6Meq+55j/SVQu/Y/+MNFTK73Yac2Q6FGATo/K2w669HluhfFTQuU+3sTSX4WnQZSAwjE9x71QJH8uTbnu+Vn2SmaOcr2Ta0oWTmn8qxmRgPkhDsBOjUk9mzcl85+g79BoB+5uhJx3YDUboGWOvRwcKzSctEVSnZOUMtKSyxMAJmxY5cTA+cPP+tVqZT2qVsUrRu5AAmhHOThxSVWiX/ywKY31OEhHhvY0wwkBd4OqnPUrMj6NagMVeC51q3Iwi/YYPxNxzjw84fIfQ4mofGJQ71wbdDRyEkhFwzfklqQtYvlPymV1+gXr2eb6O9gWPuphmU6pQ9xpT2vyd0tionPno8Vy1bE9T94wIkvP9G4RlR7bca4H5tfrS6aM5F6QsQ4Q2Fnvisx174IuYajcSUFyZkr3QPTZ+CHfoSS4B/uVvydLSpliH9qYL6ygwq+/VKjx+D9TMW4zkpGojdfntTOsn0A0QHY5NKdRftn5Eih3C6C1wDN5eFAJkA5janWJ4Qkwr43lJcfq0HDETX3mEXylaOWcVgk+vSy5+TgfLXmpoWQN4lqhQHiKqgum8q/DvokMgUWUGWW+P6w2KD/8UD5WrlHjP87nrPEvJzHKskXvqu5DBVU0oYn5Ra/FTCm0NEAkHkCNl1KZhaHg5LzO1HJPfD5Aumwg1C2nDdv3f/JJabuDYvWI3jMjrjherN95FBAyAopzdFf6YhbBa0dIPL0QE/wtMbUAQM+Mwyx2+rnEsly1psCWWKTBa+UKL/dsVCS6eIrOuWDeY4VuC3hJPg4/P7ulmQ0mUQdfKmsxZsYcmq0HvVgI0WDYHrjmM0NEWkQvll2cerxlVfXUSJPf23gGOUn9zQjAcSnC53CT8ajmvuazSKjF9pXYG5BTVuDGHOte4SfUOoXc3GuJZpqnTUAELSgUIQ8zgqGtQngyrMhIPCH1DcfsMfG3dVxr7nWnBw2syZzEtSQ1yeJRmt+k0sHSjgz0bxlsEJ0wUuEy7k+iPtdQ48Ar8hVWxs3YMaPh9dxDMr/D1qYI4W5DW2+S9DjOgkfC9I8x9hUPxQtXdCl0VbG1iuuRrgIi/qMGpxy9K/AjSCodpRNjk3e3axktGEIB85GNGmonKl6rVGBCIPOlkiFjbekfK8A2zTcsmyEyDjW5R0KYEtLSazAGEsnSA7Ot92jvxHNQrirBKg9IwVIwtKFMLoMYdrs3w1L

Hello,

The edge iterator/circulator around a vertex gives edges around the target, in a counter clockwise manner.

Although there is not really any notion of halfedges in a triangulation, the fact that an edge is described by a face and the index of the vertex opposite to the edge in that face is indeed pretty much the definition of a halfedge (since the edge can be described in two different manners). Using this 'halfedge' point of view, the way you circulate around the vertex will be counter clockwise and such that target(edge, tr) == v. You only get the edge once.

If you really want to get the opposite halfedge, you can use the function 'mirror_edge'.

Concerning the forced orientation that you have noticed, I do not know the reason, I'll ping the authors and come back to you.

Best,
Mael

On 14/06/2019 15:10, Stefan Witzel wrote:
Hi again,

If I understand correctly in lines 135-136 of

Hyperbolic_triangulation_2/include/CGAL/internal/Hyperbolic_Delaunay_triangulation_traits_2_functions.h

the orientation of hyperbolic segments is chosen so that circular arcs
are always (counter-?)clockwise, discarding potential combinatorial
information. That is, a hyperbolic segment from p to q may end up
going from q to p. Is this correct and is there a good reason for it?

Best,
Stefan

Am Fr., 14. Juni 2019 um 14:13 Uhr schrieb Stefan Witzel
<>:
Hello again,

I have the following piece of code where dt is a hyperbolic Delaunay
triangulation, and vt is a vertex handle.

ecr = vt->incident_edges();
do
{
if (!dt.is_Delaunay_hyperbolic(*ecr)) {
break;
}
process(dt.dual(*ecr));
} while (++ecr != vt->incident_edges());

Now I would like that the ecr->target() in one iteration is
ecr->source() of the next iteration (I'm sweeping casting of ecr to a
Euclidean_segment_2 respectively Circular_arc_2 under the rug). Now my
problem is that not only is this not the case but neither does there
seem to be any kind of pattern. So my question is: is there any way to
predict the orientation of the dual segment of a (hyperbolic) Delaunay
triangulation? Thanks in advance!

Best,
Stefan

Am Fr., 14. Juni 2019 um 11:20 Uhr schrieb Stefan Witzel
<>:
Dear Mael,

Thank you for this nice explanation! I have in fact run into issues
with non-hyperbolic faces which I had understood mathematically and
thanks to you now understand also on the software level.

Best,
Stefan

Am Fr., 14. Juni 2019 um 08:12 Uhr schrieb Mael
<>:
Hello,

This is usually the case, if you look at the documentation page of e.g.
Regular_triangulation_2, you'll see a section "Additional Inherited
Members", which contains exactly what you have in mind (typedefs and
functions from Triangulation_2).

Hyperbolic_Delaunay_triangulation_2 (HDT2) is a little bit different
because it inherits Delaunay_triangulation_2 (DT2), but in a private
way. This is done exactly so that not everything from DT2 is shown in
the documentation. This is because the simplicies in a HDT2 form only a
subset of the simplices of a DT2. Thus, we are internally building a DT2
and the class HDT2 is just a filter on top of the DT2.

You can use the functions from DT2 (or even T2, which DT2 inherits), but
be careful that you will then be working with the full DT2 structure and
not the HDT2. You can apply hyperbolic filtering manually via the
"is_hyperbolic()" family of functions to bring things back to HDT2.

Best,
Mael

On 13/06/2019 22:15, Stefan Witzel wrote:
Hi,

Sorry about my last question! In case someone is actually wondering:
the answer are face circulators [1]. The documentation would be much
more accessible if one could see all the inherited methods somewhere.
I was looking at the documentation for
Hyperbolic_Delaunay_triangulation_2 and from there it's a bit of a way
down to Triangulation_2, especially when you are wondering about the
traits and data structures along the way.

Best,
Stefan

[1]
https://doc.cgal.org/latest/Triangulation_2/classCGAL_1_1Triangulation__2.html#a1bda2ab92ccf638bb22fc223ae281b96

Am Do., 13. Juni 2019 um 16:32 Uhr schrieb Stefan Witzel
<>:
Hello,

I do not have any previous experience with cgal and my question is a
rather conceptual one without much technical insight: I would like to
iterate over the faces of a Voronoi diagram and then over the edges of
each face (to obtain a closed polygon); in other words this means to
iterate over the vertices of a Delaunay triangulation and then over
the edges incident with this vertex. Am I right to assume that this is
fundamentally problematic with the default parameters for
Delaunay_triangulation_2 (Triangulation_vertex_base_2,
Triangulation_face_base_2) as a vertex does not ``know'' the edges it
is incident with? Is there a kind of dual assignment that I could use
(like ``(Tessellation_face_base, Tessellation_vertex_base)'')?

Since tessellations into non-triangles may be more complicated, would
it be a possibility to first produce the (common) barycentric
subdivision?

Best,
Stefan
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss





Archive powered by MHonArc 2.6.18.

Top of Page