Subject: CGAL users discussion list
List archive
- From: Adam Getchell <>
- To:
- Subject: [cgal-discuss] Use of the 3D flip function
- Date: Tue, 6 May 2014 22:32:07 -0700
I'm looking to use the flip function in a 3D Delaunay triangulation in order to convert 2 simplices into 3, starting from a seed with 2 cells:
S3->insert(typename T::Point(0,0,1));
S3->insert(typename T::Point(1, 0, 1));
S3->insert(typename T::Point(0, 1, 1));
S3->insert(typename T::Point(0, 0, 2));
/// This point gives us two cells, 5 vertices, 9 edges, and 7 faces
/// These two cells are the basis for the 2-6 3D ergodic move
S3->insert(typename T::Point(0, 0, 0));
It looks like I need to obtain an edge to do so. I have this code so far:S3->insert(typename T::Point(0,0,1));
S3->insert(typename T::Point(1, 0, 1));
S3->insert(typename T::Point(0, 1, 1));
S3->insert(typename T::Point(0, 0, 2));
/// This point gives us two cells, 5 vertices, 9 edges, and 7 faces
/// These two cells are the basis for the 2-6 3D ergodic move
S3->insert(typename T::Point(0, 0, 0));
/// Get a cell
Delaunay::Finite_cells_iterator cit;
cit = S3->finite_cells_begin();
assert(S3->is_cell(cit));
/// Get an edge, hopefully in the same cell
Delaunay::Finite_facets_iterator fit;
fit = S3->finite_facets_begin();
/// Now flip them
//Delaunay::flip(fit);
After determining that fit is indeed the internal facet to the cells initialized above.
I'll keep reading the manuals.
The source code is here:
https://github.com/acgetchell/CDT-plusplus/blob/master/spherical_3_complex.h
https://github.com/acgetchell/CDT-plusplus/blob/master/spherical_3_complex.h
--
Adam Getchell
"Invincibility is in oneself, vulnerability in the opponent." -- Sun Tzu- [cgal-discuss] Use of the 3D flip function, Adam Getchell, 05/07/2014
- Re: [cgal-discuss] Use of the 3D flip function, Monique Teillaud, 05/07/2014
Archive powered by MHonArc 2.6.18.