Skip to Content.
Sympa Menu

cgal-discuss - Re:Re: [cgal-discuss] how to integrate Delaunay_triangulation_3 into Alpha_shape_3

Subject: CGAL users discussion list

List archive

Re:Re: [cgal-discuss] how to integrate Delaunay_triangulation_3 into Alpha_shape_3


Chronological Thread 
  • From: Song Lin <>
  • To:
  • Subject: Re:Re: [cgal-discuss] how to integrate Delaunay_triangulation_3 into Alpha_shape_3
  • Date: Sat, 08 May 2010 22:19:13 +0800

Now I have another problem:

For each point in "vector<Weighted_point> vwp" I used to build the
Alpha_shape_3, I tried to find the exact Vertex_handle in Alpha_shape_3
using "nearest_power_vertex()" but sometimes it doesn't find the vertex
I want. For example, sometimes nearest_power_vertex(point) returns a
vertex that point.x() not equal to vertex->point().x(). But I know there
should be one vertex that vertex->point().x() is exactly the same with
point.x().

I searched all of the points in "vector<Weighted_point> vwp" using
"nearest_power_vertex()". Some of the vertices were found several times
and some were never found. I have other information for the points and
what I want is each of the vertex was found once so I can put the
information into each vertex->info().


Can anyone help me about this problem?

Best regards,
Lin



在 2010-05-08六的 21:18 +0800,Song Lin写道:
> I tried "nearest_power_vertex()" and it works. Thanks!
>
> Lin
>
>
> 在 2010-05-08六的 13:17 +0200,Manuel Caroli写道:
> > Dear Song Lin,
> >
> > you are computing the alpha shapes of a *regular* triangulation. Regular
> > triangulations work with weighted points. The nearest vertex query is
> > thus called nearest_power_vertex().
> >
> > I see two possibilities: Either you use Delaunay triangulations instead
> > of regular triangulations or you call nearest_power_vertex instead of
> > nearest_vertex.
> >
> > hope this helps
> >
> > Manuel
> >
> > On 08/05/10 09:30, Song Lin wrote:
> > > Hi,
> > >
> > > I was trying to use the function "dt.nearest_vertex(Point p)". And the
> > > class "Delaunay_triangulation_3" was needed.
> > >
> > > But I don't know how to integrate the class into my codes. The typedef
> > > part of my codes are:
> > >
> > > typedef CGAL::Exact_predicates_inexact_constructions_kernel Kk;
> > > typedef CGAL::Regular_triangulation_euclidean_traits_3<Kk> Gt;
> > > typedef CGAL::Alpha_shape_vertex_base_3<Gt> Vb_as;
> > > typedef CGAL::Triangulation_vertex_base_with_info_3<vertexinfo, Kk,
> > > Vb_as> Vb;
> > > typedef CGAL::Alpha_shape_cell_base_3<Gt> Cb_as;
> > > typedef CGAL::Triangulation_cell_base_with_info_3<cellinfo, Kk, Cb_as>
> > > Cb;
> > > typedef CGAL::Triangulation_data_structure_3<Vb,Cb> Tds;
> > > typedef CGAL::Regular_triangulation_3<Gt,Tds> Triangulation_3;
> > > typedef CGAL::Alpha_shape_3<Triangulation_3> Alpha_shape_3;
> > >
> > >
> > > What should I do to use the function Alpha_shape_3.nearest_vertex() in
> > > my codes? Maybe it's naive but I was confused with the relationships
> > > between "traits","data_structures",and "kernels"..
> > >
> > > Best regards,
> > > Lin
> > >
> >
> >
> --
> Center of Computational and Systems Biology,
> Institute of Biophysics, CAS.
> 15 Datun Road, Chaoyang District
> Beijing, 100101
> P.R.China
>
>
>
--
Center of Computational and Systems Biology,
Institute of Biophysics, CAS.
15 Datun Road, Chaoyang District
Beijing, 100101
P.R.China





Archive powered by MHonArc 2.6.16.

Top of Page