Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] Surface facet from Triangulation_3
- Date: Mon, 06 Dec 2010 08:29:35 +0100
To see how to build a Delaunay triangulation, have a look here
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Triangulation_3/Chapter_main.html#Subsection_37.5.1
To get facets that are on the convex hull of your point set,
use this function
template <class OutputIterator>
OutputIterator t.incident_cells ( Vertex_handle v, OutputIterator cells)
using a handle to the infinite vertex ( t.infinite_vertex() ).
For each cell c found, you can get the facet as
std::make_pair(c,c.index(t.infinite_vertex())).
Remember that as documneted here:
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/TriangulationDS_3_ref/Concept_TriangulationDataStructure_3.html
Facet (c,i) is the facet of c opposite to the vertex of index i.
To get vertices on the convex hull use this function:
template <class OutputIterator>
OutputIterator t.adjacent_vertices ( Vertex_handle v, OutputIterator vertices)
using a handle to the infinite vertex.
These functions are documented here:
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Triangulation_3_ref/Class_Triangulation_3.html
The cell type is documented here:
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/TriangulationDS_3_ref/Concept_TriangulationDataStructure_3--Cell.html
S.
piroshiki wrote:
Hello,
I'm researching CGAL for 3D Triangulations and surface mesh.
I want to get surface facets and its vertices of the convex hull after
execute 3D Delaunay Triangulation from point sets. How can I do this with
CGAL ?
Please teach me a concrete example code like this:
1. Give the coordinates (x, y, z) of the points to insert. For example, cube
consists of eight points,
(0, 0, 0), (1, 0, 0), (0, 1, 0), (0, 0, 1), (1, 1, 0), (0, 1, 1), (1, 0,
1), (1, 1, 1)
2. Execut 3D Delaunay Triangulation from these points.
3. Access all facets, and determine which are surface facets of the cube
model's convex hull. If the facet is surface, output its vertices' cooridnates like p1(x1, y1,
z1), p2(x2, y2, z2), p3(x3, y3, z3)
In this case, I think I can get 12 facets from cube. What I think is
correct ?
I am sorry if my English is hard to understand. Please ask if you would like
me to explain something again.
- [cgal-discuss] Surface facet from Triangulation_3, piroshiki, 12/03/2010
- Re: [cgal-discuss] Surface facet from Triangulation_3, Sebastien Loriot (GeometryFactory), 12/06/2010
- [cgal-discuss] Re: Surface facet from Triangulation_3, piroshiki, 12/06/2010
- Re: [cgal-discuss] Re: Surface facet from Triangulation_3, Sebastien Loriot (GeometryFactory), 12/06/2010
- [cgal-discuss] Re: Surface facet from Triangulation_3, piroshiki, 12/06/2010
- Re: [cgal-discuss] Surface facet from Triangulation_3, Sebastien Loriot (GeometryFactory), 12/06/2010
Archive powered by MHonArc 2.6.16.