Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] voronoi nearest neighbor/example
- Date: Tue, 14 Jun 2011 18:07:17 +0200
Have you seen this package dealing with k-nearest neighbor?
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Spatial_searching/Chapter_main.html
If you want to use the Voronoi stuff, you should use the Delaunay_triangulation_2 (which is the dual of the Voronoi)
instead and the locate function with your point. Then check from
which vertex of the simplex you are the closer to.
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Triangulation_2/Chapter_main.html
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Triangulation_2_ref/Class_Delaunay_triangulation_2.html
Sebastien.
kg wrote:
Hello,
I am a beginner in CGAL and in general computaional geometry, I have got a
question.
I have been analyzing this example:
examples/Voronoi_diagram_2/point_location.C, in general it locates a point
and tells if it is a voronoi vertex or lies on one of the edges or any face.
Voronoi diagram is created from given set of points (let's call them
'inital'). Is there any easy way to add to this code information like "this
voronoi face has been created around [number/coordinates] 'initia' point"
Then it would be the solution for "the nearest neighbor problem".
I assume it should be quite easy, but I have no idea how to do this.
KG
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/voronoi-nearest-neighbor-example-tp3596985p3596985.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] voronoi nearest neighbor/example, kg, 06/14/2011
- Re: [cgal-discuss] voronoi nearest neighbor/example, Sebastien Loriot (GeometryFactory), 06/14/2011
Archive powered by MHonArc 2.6.16.