Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] 2D Segment Delaunay & nearest neighbour for segments

Subject: CGAL users discussion list

List archive

[cgal-discuss] 2D Segment Delaunay & nearest neighbour for segments


Chronological Thread 
  • From: <>
  • To:
  • Subject: [cgal-discuss] 2D Segment Delaunay & nearest neighbour for segments
  • Date: Mon, 14 Feb 2011 12:14:00 +0100 (CET)

Hi!

I'm trying to use Voronoi diagram in order to find the nearest segment to a
given point. It seems that it isn't easy for the current class structure.

Problem:
On input I have a set of segments. Now I can construct Voronoi diagram and
obtain the nearest Voronoi site for a given point. The problem is that there
is
no simple correspondence between the site I got and the original segments.
Ideally one would like to obtain an index (reference) to one of the original
segments. If one has some information associated with a segment then it's
possible to obtain it easily. Instead, one can only obtain a site which has
references to points, segments, but it's only geometric information, e.g.
coordinates. It's possible to redefine Vertex base class and store some info
in
vertices, but not in segments. Since one vertex may share many segments it
doesn't help.

General proposal: memory optimization
1. Now a Voronoi site is defined as 1-6 point handles (pointers). For 32-bit
mode it's OK, but for 64-bit it can be optimized. If you store all points in
one array, then index in the array still can be 32 bit integer, and so it
takes
twice less memory.
2. If a site is an intersection of segments, then it's enough to store just
references to the segments, their points can be obtained indirectly. In this
case you need max 3 handles per site.

P.S. Thank you for the library.


  • [cgal-discuss] 2D Segment Delaunay & nearest neighbour for segments, bulovyatov, 02/14/2011

Archive powered by MHonArc 2.6.16.

Top of Page