Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] How to find coordinates of Segment Voronoi Vertex

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] How to find coordinates of Segment Voronoi Vertex


Chronological Thread 
  • From: Daniel Duque Campayo <>
  • To:
  • Subject: Re: [cgal-discuss] How to find coordinates of Segment Voronoi Vertex
  • Date: Fri, 4 Apr 2008 09:41:52 +0200

Hello,

I think what you need is explained in:

http://www.cgal.org/Manual/3.3/doc_html/cgal_manual/Triangulation_2/Chapter_main.html#Subsection_25.5.3

The key would be the iteration over edges, taking the dual of them, then
assigning them to either segments or rays:

for ( ; eit !=T.edges_end(); ++eit) {
CGAL::Object o = T.dual(eit);
K::Segment_2 s;
K::Ray_2 r;
if (CGAL::assign(s,o)) ...
if (CGAL::assign(r,o)) ...
}

I either case, you can extract the coordinates of the segment with
s.vertex(0)
and s.vertex(1) (those are points, s.vertex(0).x will be your x Cartesian
coordinate, etc). With rays, you'll only have r.source().

Best,

Daniel

PD: A minor issue: you'll get all the vertices twice this way...


On Friday 04 April 2008 08:12:03 Amit Pendharkar wrote:
> Hi All,
>
> I am using Segment Voronoi algorithm(Segment Delaunay Graph) to find the
> Voronoi edges.
>
> I want to find out the 'voronoi vertices' i.e. those points where two or
> more voronoi edges meet.
>
> I referred to the program
> /CGAL/examples/Segment_Delaunay_graph_2/sdg-voronoi-edges.cpp
>
> It gives the edges according to
> \ /
> \ B /
> \ /
> C ----------------- D
> / \
> / A \
> / \
>
> i.e. it gives A, B, C & D.
>
> My question is - how can I get the coordinates of the voronoi vertex formed
> due to ABC or BAD ?????? I want the cartesian x, y coordinates of those
> vertices.
>
> This is kind of urgent. Can anybody please comment on this. All the inputs
> are highly appreciated.
>
> Thanks & Regards,
> Amit Pendharkar



--
Daniel Duque
http://rincon.uam.es/dir?cw=950067138671875



Archive powered by MHonArc 2.6.16.

Top of Page