Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Neighbors vertices on a Polyhedron

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Neighbors vertices on a Polyhedron


Chronological Thread 
  • From: Andreas Fabri <>
  • To:
  • Subject: Re: [cgal-discuss] Neighbors vertices on a Polyhedron
  • Date: Tue, 18 Sep 2007 22:26:32 +0200

Laurent Le Guillou wrote:
Hello,

With CGAL, is there a way to enumerate (with an iterator
or something) the neighboors of a vertex : for instance all the
first neighboors ("order 1" neighboors), the second neighboors
(neighboor of a neighboor, "order 2" neighboors), the third
neighboors ("order 3"), and so on, but without enumerating the same
vertex twice. I am a physicist, without a very deep knowledge of
graph-related mathematics; I searched in graph-literature but did
not found any simple algorithm. I need something quite fast as I
want to select all the neighboors of a given vertex of "order" less
than a fixed k, and I need to do this for all vertices, in order
to compute local physical properties (a "local plane" and other
mechanical properties).

Note that the code I posted does it for one vertex
and exhaustively.
So you have to run it for each vertex and have a
distance recorder that stops when k is reached.

andreas


Thanks a lot if someone could give me a hint on how to do this
in an efficient way (I may of course walk across the whole
polyhedron data structure several times, but my polyhedrons
have tens of thousands points...).

Cheers,

Laurent

-----------------------------------------------------------------------
Laurent LE GUILLOU Tel +33 1 44 27 39 93


Fax +33 1 44 27 46 38


GSM +33 6 20 05 75 22

LPNHE - Université Paris 6
Bureau 412 - Tour 33 RdC
Campus de Jussieu
4 place Jussieu
75252 Paris Cedex 05



Archive powered by MHonArc 2.6.16.

Top of Page