Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] How are points in triangulation_3 indexed?

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] How are points in triangulation_3 indexed?


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] How are points in triangulation_3 indexed?
  • Date: Thu, 29 Mar 2012 17:10:32 +0200

On 03/29/2012 04:26 PM, ayongwust_sjtu wrote:
I stepped into<< operator of Triangulation_3 with the predefined example :
examples/Triangulation_3/simple_triangulation_3.cpp

Here is the way the points were inserted in the example:
-------------------------------
std::list<Point> L;
L.push_front(Point(0,0,0));
L.push_front(Point(1,0,0));
L.push_front(Point(0,1,0));

Triangulation T(L.begin(), L.end());

Triangulation::size_type n = T.number_of_vertices();

// insertion from a vector :
std::vector<Point> V(3);
V[0] = Point(0,0,1);
V[1] = Point(1,1,1);
V[2] = Point(2,2,2);
-------------------------------
When calling<< operator, the triangulation object recursively retrieve all
its vertex iterators, and
copy them into a TV vector(std::vecotor<Vertex_handle> TV(n+1)).

Then, here are my questions:
1), Why an infinite vertex is defined as the first one of the triangulation?
tr.is_infinite(TV[0]);

See this:
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Triangulation_3/Chapter_main.html#Section_39.1


2), Why the order of points of the triangulation is different with which
they inserted?
see
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Triangulation_3_ref/Class_Delaunay_triangulation_3.html#Function_std::ptrdiff_t_insert6PointInputIterator_first+_PointInputIterator_last9;

And also this:
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Triangulation_3/Chapter_main.html#Subsection_39.5.3

for how to get the initial order.

Sebastien.

The output order of points is:
1 0 0
0 0 0
0 1 0
1 1 1
2 2 2
0 0 1

While the order in which points were inserted:
L.push_front(Point(0,0,0));
L.push_front(Point(1,0,0));
L.push_front(Point(0,1,0));
.....
V[0] = Point(0,0,1);
V[1] = Point(1,1,1);
V[2] = Point(2,2,2);


Best Regards,
Xianyong Liu

-----
-------------

Regards,
Xianyong Liu
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/How-are-points-in-triangulation-3-indexed-tp4515572p4515572.html
Sent from the cgal-discuss mailing list archive at Nabble.com.





Archive powered by MHonArc 2.6.16.

Top of Page