Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Accesing vertices in Apollonius_graph_2

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Accesing vertices in Apollonius_graph_2


Chronological Thread 
  • From: eduriol <>
  • To:
  • Subject: Re: [cgal-discuss] Accesing vertices in Apollonius_graph_2
  • Date: Tue, 15 Dec 2009 08:05:51 -0800 (PST)


I have noticed that Apollonius graph is not the same as Apollonius diagram
(in fact one is each other's dual, like Delaunay triangulation and Voronoi
diagram).

What I really want is to get the vertices of the Apollonius diagram (not the
sites), which are points lying inside the faces of the Apollonius graph.

I don't know if it is possible to get such points in CGAL.

Could anyone help me? Sorry for the misunderstanding.



eduriol wrote:
>
> How can I access the position on the plane of the vertices from a given
> Apollonius graph?
>
> I'm a beginner with CGAL, I've been searching a lot in documentation but
> haven't find what I need. I append some code as example:
>
> ---------------------------------------------------------------------------
>
> /* Typedefs */
> typedef CGAL::Cartesian<double> K;
> typedef CGAL::Point_2<K> Point_2;
> typedef CGAL::Apollonius_graph_filtered_traits_2<K> Gt;
> typedef CGAL::Apollonius_graph_vertex_base_2<Gt> Vb;
> typedef CGAL::Triangulation_face_base_2<Gt> Fb;
> typedef CGAL::Triangulation_data_structure_2<Vb,Fb> Agds;
> typedef CGAL::Apollonius_graph_2<Gt,Agds> Apollonius_graph;
> typedef Gt::Site_2 Site_2;
> typedef Gt::Site_2::Weight Weight;
>
> /* Sites' position vector declaration */
> std::vector<Point_2> points;
> -- Code to fill points in here...
>
> /* Point of vertices declaration */
> std::vector<Point_2> ap_vertices;
>
> /* Graph declaration */
> Apollonius_graph ap;
> /* Graph filling */
> for (int i=0; i<points.size(); i++) {
> ap.insert(Site_2(points[i], Weight(10*i)));
> }
>
> Now, how can I access to the vertices (not the sites) of 'ap' to fill
> 'ap_vertices' with them?
>
> Many thanks.
>

--
View this message in context:
http://n4.nabble.com/Accesing-vertices-in-Apollonius-graph-2-tp962748p964443.html
Sent from the cgal-discuss mailing list archive at Nabble.com.



Archive powered by MHonArc 2.6.16.

Top of Page