Subject: CGAL users discussion list
List archive
- From: "Alex Vergara Gil" <>
- To: <>
- Subject: Re: [cgal-discuss] CGAL dD Delaunay Problem
- Date: Tue, 25 Mar 2014 14:17:38 -0500
Mainly because you have commited several
bugs
--------------------------------------
instead of
Point p(3, coord+i*3, coord+i*3+3);
put
Point p(coord+i*3, coord+i*3+1, coord+i*3+2);
---------------------------------------
or you can redefine
double coord[] = {
as
Point coord[] = {
{15.987446522913068, 27.202164077804600,
-1.7503256142623180},
... and so on
and instead of
Point p(3, coord+i*3, coord+i*3+3);
simply Point p = coord[i]
The two ways are equivalent
Regards
Alex
----- Original Message -----
From:
Ge
Zhang
To:
Sent: Tuesday, March 25, 2014 12:56
PM
Subject: [cgal-discuss] CGAL dD Delaunay
Problem
Dear Sir or Madam,
I am not sure if I have made an error or if there is a bug in CGAL dD Delaunay package. I need to do Delaunay triangulation of some three-dimensional points and need to generalize the code to other dimensions later. So I wrote this code: /////////////////////////////////////////////////////////////////////////// double coord[] = { 15.987446522913068, 27.202164077804600, -1.7503256142623180, 15.783731654803892, 27.268252018459251, -1.7667168014850418, 15.366332754158634, 25.364059942735178, -0.12067529139448278, 14.798358756496864, 25.645272186454374, -0.24621719891310628, 14.416741390968623, 26.534931393517535, -0.90761123478229566, 12.653889524424551, 30.356776464885129, 1.6780311801981169, 20.141382962264476, 29.666174471723380, 0.81578848925181291, 15.255480206458079, 32.065555891106911, 0.14008969527418605, 15.856413673274881, 31.537804468497811, -0.50108136475224174, 19.537758401022533, 29.790220202824923, -0.21754568768545338, 19.418171028905622, 29.790007422401796, -0.38830723957693186, 20.081590302704605, 29.854788525235321, 0.73931846754153374, 16.096713953744956, 24.603235225447076, 1.9663067370703267, 15.057336655250380, 24.912757478035189, 2.7258085800022718, 19.717425535978570, 27.248357239016887, 3.5216075631300305, 20.340124881568187, 28.287915509305925, 2.9881740318160834, 18.440406384399445, 28.756603149763084, 5.7274305773261025, 19.732584195169082, 29.437336063389296, 4.1695063361795697, 16.615174375063219, 32.278894713132360, 2.6796054812782928, 19.411374934889903, 30.874452428442833, 2.6765292926211286, 15.527857372851596, 31.342303101257738, 4.4163514428924291, 17.970992967584714, 28.796276720304878, 5.9574834972343362, 14.323514965294358, 26.455018287900284, 4.7555968341210084, 12.748877146187398, 30.055258023558022, 3.4117720135679241, };
#include <CGAL/Cartesian_d.h> #include <CGAL/Kernel_d/Sphere_d.h> #include <CGAL/Delaunay_d.h> #include <iostream> #include <list>
typedef CGAL::Cartesian_d<double> Kernel; typedef CGAL::Delaunay_d<Kernel> Delaunay; typedef Delaunay::Vertex_handle Vertex_handle; typedef Delaunay::Simplex_handle Simplex_handle; typedef Delaunay::Point_d Point;
int main() { Delaunay De(3); for(int i=0; i<24; i++) { Point p(3, coord+i*3, coord+i*3+3); De.insert(p); } std::list<Simplex_handle> simplices = De.all_simplices(); std::cout<<simplices.size(); return 0;} ///////////////////////////////////////////////////////////////////////////
When I run this program on a Windows Server 2012 machine using Visual Studio 2012 compiler, the output I get is: 3
The problem is, if one plot the coordinates using MATLAB, one can clearly see that those points form a polygon and the Delaunay triangulation should consist of way more than 3 simplices. But why does the program only find 3 simplices?
Best, Ge Zhang
__________ Información de ESET NOD32 Antivirus, versión de la base de firmas de virus 9584 (20140324) __________ ESET NOD32 Antivirus ha comprobado este mensaje. http://www.eset.com |
- [cgal-discuss] CGAL dD Delaunay Problem, Ge Zhang, 03/25/2014
- Re: [cgal-discuss] CGAL dD Delaunay Problem, Alex Vergara Gil, 03/25/2014
- RE: [cgal-discuss] CGAL dD Delaunay Problem, Ge Zhang, 03/25/2014
- Re: [cgal-discuss] CGAL dD Delaunay Problem, Alex Vergara Gil, 03/25/2014
Archive powered by MHonArc 2.6.18.