Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] polygon triangulation
- Date: Tue, 15 Mar 2011 11:47:44 +0100
Please have a look at the FAQ.
http://www.cgal.org/FAQ.html#polygon_triangulation
S.
sara123 wrote:
hi,
How can we triangulate (Basic Triangulation) a simple polygon that was been
produced with this kernel:
#include <CGAL/double.h>
typedef double RT;
typedef CGAL::Cartesian K;
typedef K::Point_2 Point_2;
typedef std::list Container;
typedef CGAL::Polygon_2<K, Container> Polygon_2;
I want to triangulate my polygon with this proccess:
#include
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Triangulation_2.h>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Triangulation_2 Triangulation;
typedef Triangulation::Vertex_circulator Vertex_circulator;
typedef Triangulation::Point Point;
int main() {
std::ifstream in("data/triangulation_prog1.cin");
std::istream_iterator begin(in);
std::istream_iterator end;
Triangulation t;
t.insert(begin, end);
Vertex_circulator vc = t.incident_vertices(t.infinite_vertex()),
done(vc);
if (vc != 0) {
do { std::cout << vc->point() << std::endl;
}while(++vc != done);
}
return 0;
}
[The vertices of my polygon should be triangulate as my points in top
process]
Thanks alot,
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/polygon-triangulation-tp3356157p3356157.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] polygon triangulation, sara123, 03/15/2011
- Re: [cgal-discuss] polygon triangulation, Sebastien Loriot (GeometryFactory), 03/15/2011
Archive powered by MHonArc 2.6.16.