Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Question about method of dealing with the unbounded half-edge in Voronoi_diagram_2

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Question about method of dealing with the unbounded half-edge in Voronoi_diagram_2


Chronological Thread 
  • From: "Fei (Sophie) Che" <>
  • To:
  • Subject: Re: [cgal-discuss] Question about method of dealing with the unbounded half-edge in Voronoi_diagram_2
  • Date: Wed, 21 Apr 2010 23:25:54 -0400 (EDT)
  • Importance: Normal

Hello, Shusen,

I'm also new to CGAL but I think the following link might be helpful to you.

http://www.cgal.org/Manual/last/doc_html/cgal_manual/Triangulation_3_ref/Class_Delaunay_triangulation_3.html

At the end of that webpage, you will find a short section talking about VD
in 3D. Notice that Delaunay triangulation is a dual graph of VD. So, you can
construct a VD by calling dt.dual.

Hope this would be helpful to you.

Best,
~Sophie

On Wed, April 21, 2010 9:14 pm, shusen liu wrote:
> Thanks very much for all the detailed answers!!!
>
> I still have another question related to voronoi diagram in CGAL. Is
> there a standard way to do 3D voronoi diagram in CGAL right now? In
> the document there is no 3D voronoi diagram section but CGAL claim to
> have 3D voronoi diagram support all the time.
>
> Any suggestion for doing 3D voronoi diagram in CGAL?
>
> Thanks very much for reading this!
>
> Regards,
> Shusen
>
> On Thu, Apr 22, 2010 at 7:00 AM, Vu, Khuong
> <>
> wrote:
>> Hi Shusen,
>>
>>
>>
>> Please see me answer below. Generally speaking, the dual of a Voronoi
>> diagram is the Delaunay, and vice versa. Please email me if you want the
>> specific code to convert.
>> ________________________________________
>> From: shusen liu
>> []
>> Sent: Wednesday, April 21, 2010 3:17 PM
>> To:
>>
>> Subject: [cgal-discuss] Question about method of dealing with the
>> unbounded half-edge in  Voronoi_diagram_2
>>
>> Hi everyone,
>>
>> I've been search on the solution for this problem for a while. Seems
>> it has been asked several times on this mailing list. But I still
>> didn't find a working solution.
>>
>> The problem we have is, when using the Voronoi_diagram_2 adapter to
>> calculate voronoi diagram within a certain region(a quad for example),
>> in order to get the correct face we need to clip the unbounded face
>> with the boundary of this region.
>>
>> it has been discussed in several thread:
>> One solution is in here :
>> https://lists-sop.inria.fr/sympa/arc/cgal-discuss/2007-06/msg00229.html
>> but it require you to use dual of Delaunay_triangulation_2 in stead of
>> voronoi_diagram_2
>>
>> Since you can't(or I don't know how) convert unbounded half-edge into
>> Ray_2, the reasonable solution would be calculate the direction by
>> yourself using the sites position. But this also turn out to be
>> difficult to do.
>>
>>
>>
>> -> please see
>> https://lists-sop.inria.fr/sympa/arc/cgal-discuss/2010-04/msg00127.html
>> for the solution.
>>
>>
>> There are two possible way to access the two sites related to the
>> edge. One is using left() and right() method for half-edge
>> structure.But when I test this method, right and left didn't return
>> the defining site along the edge (the vertex returned seems like the
>> geometrical on the "left" or "right" of the edge, not the sites define
>> the edge)
>>
>> -> please see the third example for the details.
>> http://www.cgal.org/Manual/3.2/doc_html/cgal_manual/Segment_Delaunay_graph_2/Chapter_main.html#Section_26.5
>>
>> I'm sure it works.
>>
>> The other one is call the half-edge's dual method, this is what
>> confuse me alot. I have no idea what the returned "Delaunay_edge" is.
>> There is no document tell you what the structure is.
>>
>> typedef Delaunay_graph::Edge    Delaunay_edge;  // I don't know where
>> Delaunay_graph is come from....
>>
>> When you goto the its
>> documets:http://www.cgal.org/Manual/last/doc_html/cgal_manual/Voronoi_diagram_2_ref/Concept_DelaunayGraph_2.html#Cross_link_anchor_1403
>>
>> It seems to have a structure like this, but the Face_handle to
>> Triangulation_ds_face_base_2 and a int index CAN ONLY decide ONE
>> vertex, HOW COULD I GET THE OTHER ONE?
>>
>> typedef std::pair<Face_handle,int>  Edge;
>>
>> I use ///
>> c_halfedge->dual().first->vertex(c_halfedge->dual().second)->point()
>>  to get the point
>>
>> Could anyone give me some hint on how to get the points data from the
>> Delaunay_graph::Edge ?
>>
>> -> there is no way to compute the vertex coordinate from the Delaunay
>> graph. You have to either convert the Delaunay into Voronoi then retrive
>> the data. This works perfectly for Voronoi/Delaunay graph of points.
>> However, there is a bug in diagram of segments. Please email me if you
>> need anything else.
>>
>>
>>
>> Best Regards,
>> Shusen
>>
>> PhD student at University of Utah
>>
>> --
>> You are currently subscribed to cgal-discuss.
>> To unsubscribe or access the archives, go to
>> https://lists-sop.inria.fr/wws/info/cgal-discuss
>>
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://lists-sop.inria.fr/wws/info/cgal-discuss
>
>





Archive powered by MHonArc 2.6.16.

Top of Page