Subject: CGAL users discussion list
List archive
- From: horstmann <>
- To:
- Subject: [cgal-discuss] Help getting triangles coordinates from Delaunay Triangulation
- Date: Mon, 31 Oct 2011 03:09:54 -0700 (PDT)
Hi there, I'm new with CGAL, i'm sure my question is very simple.
I am trying to use CGAL to do some Delaunay triangulation. I have a grid
with N 3D points over a sphere and I want to triangulate the sphere using
those points as the vertex of the triangles. I just need to get a list of
the vertex of the resulting triangles like that:
id_triangle1 vertex_1 vertex_2 vertex_3
id_triangle2 vertex_1 vertex_2 vertex_3
.......
I have done that to perform the triangulation:
std::vector<Point> P;
for(i=0;i<NSPOINTS;i++)
P.push_back(Point(GRID[i].x,GRID[i].y,GRID[i].z));
// building Delaunay triangulation.
Delaunay dt(P.begin(), P.end());
The problem I have is that I have no idea how to get the resulting
triangulation. I figured out how to get the face_iterator, but I don't know
what to do from there:
Delaunay::Finite_faces_iterator it;
for (it = dt.finite_faces_begin(); it != dt.finite_faces_end();
it++){
std::cout << dt.triangle(it) << std::endl;
}
I'm not sure if that is correct to iterate over the triangles, and if it
is...
a triangle = face ??¿ , i mean , each iterator position have only a
triangle¿?
How can I get correctly the x,y and z of each triangle¿?¿
Thank you a lot in advance!
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Help-getting-triangles-coordinates-from-Delaunay-Triangulation-tp3955310p3955310.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] Help getting triangles coordinates from Delaunay Triangulation, horstmann, 10/31/2011
- Re: [cgal-discuss] Help getting triangles coordinates from Delaunay Triangulation, Sebastien Loriot (GeometryFactory), 10/31/2011
- [cgal-discuss] Re: Help getting triangles coordinates from Delaunay Triangulation, horstmann, 10/31/2011
- [cgal-discuss] Re: Help getting triangles coordinates from Delaunay Triangulation, adam.hopkins83, 10/31/2011
- Re: [cgal-discuss] Re: Help getting triangles coordinates from Delaunay Triangulation, Sebastien Loriot (GeometryFactory), 10/31/2011
- [cgal-discuss] Re: Help getting triangles coordinates from Delaunay Triangulation, horstmann, 10/31/2011
- Re: [cgal-discuss] Help getting triangles coordinates from Delaunay Triangulation, Sebastien Loriot (GeometryFactory), 10/31/2011
Archive powered by MHonArc 2.6.16.