Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Problems with a 3D Triangulation

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Problems with a 3D Triangulation


Chronological Thread 
  • From: Marc Glisse <>
  • To:
  • Subject: Re: [cgal-discuss] Problems with a 3D Triangulation
  • Date: Tue, 25 Oct 2011 17:26:04 +0200 (CEST)

On Tue, 25 Oct 2011, Juan Carlos Lopez Alfonso wrote:

Thank again for your help. In these links you can download the
example code (example.cpp) and the data file (either in .rar or .txt),
with the set of points, where in the first line of this file is the
number of points and in the other lines the listed set of points. If
you didn't download these files, please tell me where I can put them
in order that you can prove my example and give me any suggestion.

http://dl.dropbox.com/u/2516160/example.cpp

(note: this is not the answer to your question, just some remarks)

You have an issue with indices: index starts at 0 in C++. I would recommend you allocate:
new double[thelength][3];
and access:
myArray[index][0] to myArray[index][2].

On this machine (2.2GHz, 2 year old, not a monster) it takes 40s for the first 100k points, still slow but far better than the 20s/4k points that you mention. Are you sure you compiled in release mode?

This is indeed a not nice case, which has to fall back to exact computations quite often. Letting CGAL reuse Gmpq variables (instead of creating and deleting new ones all the time) divides the runtime by 2, but that's still quite slow, and not available without patching cgal.

Andreas (or others) may have better ideas at the triangulation level.

--
Marc Glisse



Archive powered by MHonArc 2.6.16.

Top of Page