Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Get near vertices

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Get near vertices


Chronological Thread 
  • From:
  • To:
  • Subject: Re: [cgal-discuss] Get near vertices
  • Date: Wed, 25 Jul 2007 17:42:33 +0200 (CEST)
  • Importance: Normal


Le Mer 25 juillet 2007 17:26, Tyver Ray a écrit :
> I would like to know if it's possible to select all the points of a 2D
> delaunay triangulation which are in a ray r from a reference point?
>
> Or do I have to deal with the function nearest_vertex only ?

If your reference point is a vertex V of the triangulation, then you can
simply greedily flood the triangulation, starting from V:
- put in C the neighbors of V which are at distance less than r from V.
- while some vertices in V have neighbors (not already in C) at distance
less than r, add these neighbors to C.

You are guaranteed to obtain in the end all the vertices at distance less
than r from V (simple property of the Delaunay triangulation).

In the general case, where V is not a vertex, it is slightly more
complicated, but as Laurent points out, CGAL does the job for you anyway.
--
Camille





Archive powered by MHonArc 2.6.16.

Top of Page