Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Delaunay_d infinite simplices

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Delaunay_d infinite simplices


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Delaunay_d infinite simplices
  • Date: Tue, 05 Jul 2011 08:30:04 +0200

Panagiotis Foteinos wrote:
Hello.

I have encountered a problem with the Delaunay_d class, where d=4.

I am reading the manual for Delaunay_d (
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Convex_hull_d_ref/Class_Delaunay_d.html#Cross_link_anchor_983
), and it seems that there is no way to test if a simplex is infinite
or not. So, I am guessing that there are no infinite simplices.
Therefore, after the insertion of 5 (linearly independent) Point_d
points, I expect to see just one simplex.

However, when I get the simplices in Delaunay_d::simplices_begin()
---> Delaunay_d::simplices_end(), I count 6 simplices. Are the 5 extra
simplices the infinite simplices? If so, how do I check whether a
simplex is infinite or not?

The problem is observed with the insertion of the following sequence
of 4D points:

(1.0/sqrt(10), 1.0/sqrt(6), 1.0/sqrt(3), 1)
(1.0/sqrt(10), 1.0/sqrt(6), 1/sqrt(3), -1)
(1.0/sqrt(10), 1.0/sqrt(6), -2.0/sqrt(3), -0)
(1.0/sqrt(10),-sqrt(3.0/2), 0, 0)
(-2*sqrt(2.0/5), 0, 0, 0)


Best Regards,
Panagiotis Foteinos


On my machine the result is fine (one simplex). How did you construct
the 4D points? You should use the constructor
template <class InputIterator>
Point_d<Kernel> p ( int d, InputIterator first, InputIterator last);

the one with four arguments builds 3D points with homogeneous coordinates.

Sebastien.

#include <CGAL/Cartesian_d.h>
#include <CGAL/Gmpq.h>
#include <CGAL/Delaunay_d.h>
#include <iostream>

typedef CGAL::Gmpq FT;
typedef CGAL::Cartesian_d<FT> Kernel;
typedef CGAL::Delaunay_d<Kernel> Delaunay_d;
typedef Delaunay_d::Point_d Point_d;
typedef Delaunay_d::Simplex_handle Simplex_handle;
typedef Delaunay_d::Vertex_handle Vertex_handle;

int main()
{
Delaunay_d T(4);
FT points[5][4]={
{FT(1.0/sqrt(10)), FT(1.0/sqrt(6)), FT(1.0/sqrt(3)), FT(1)},
{FT(1.0/sqrt(10)), FT(1.0/sqrt(6)), FT(1/sqrt(3)), FT(-1)},
{FT(1.0/sqrt(10)), FT(1.0/sqrt(6)), FT(-2.0/sqrt(3)), FT(-0)},
{FT(1.0/sqrt(10)),FT(-sqrt(3.0/2)), FT(0), FT(0)},
{FT(-2*sqrt(2.0/5)), FT(0), FT(0), FT(0)}
};

T.insert(Point_d(4,points[0],points[0]+4));
T.insert(Point_d(4,points[1],points[1]+4));
T.insert(Point_d(4,points[2],points[2]+4));
T.insert(Point_d(4,points[3],points[3]+4));
T.insert(Point_d(4,points[4],points[4]+4));

int index=0;
Delaunay_d::Simplex_iterator it=T.simplices_begin();
for(;it!=T.simplices_end();++it,++index);

std::cout << index << std::endl;
}




Archive powered by MHonArc 2.6.16.

Top of Page