Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Question about Convex_hull_d

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Question about Convex_hull_d


Chronological Thread 
  • From: "dmyan" <>
  • To: <>
  • Subject: Re: [cgal-discuss] Question about Convex_hull_d
  • Date: Fri, 15 Jun 2007 17:55:13 +0800

Dear Sylvain,
Thanks for your reply! I want to ask another question about Convex_hull_d.

I want to calculate the volume of a Convex_hull_d volume. The method is first to find a point which
inside the convex hull, then connect this point with points of each facet to form a set simplices. The volume of each simplex is calculated seperately and added together. Because I want to compute the oriented volume each simplex, the sequence of points of each facet is important. My problem is that I find the volume signs of all the simplices are not same. I use 3D points for testing. Then I convert the Convex_hull_d to a Polygon_3 object, and compute the volume again. An example is listed below. We can see that some signs are different. Is there any methods to solve this problem?

Thanks

Best

dmyan

#vertices: 24
-14.54514959202176 -8.0475974614687189 -16.735720761559385
-5.948453608247422 -3.4329896907216488 -28.443298969072167
5.4341085271317837 11.364341085271318 -15.92248062015504
-17.947247706422022 6.6766055045871573 -28.602064220183497
-15.648148148148151 -4.5123456790123369 -17.796296296296298
-16.286624203821656 5.4904458598726116 -10.453821656050955
-14.681520850367949 6.1901062959934583 -3.0662305805396572
-5.9290666666666656 3.6906666666666665 -2.5882666666666663
-3.6245576786978071 2.8043170559094128 -3.3733191790516628
-13.626489989584538 2.179088068510588 -2.6812868880916576
-10.651357990992222 -5.8712296983758696 -7.8877439606933262
-13.09590421672176 -3.5930420059662995 -6.2426429089736377
-11.95626312106368 -8.175997200839749 -13.581875437368787
-14.369981751824813 -8.1503193430656911 -16.108576642335763
-12.165267282395746 9.4311502938706973 -3.2781975930590543
-11.84157894736842 9.3894736842105253 -3.2650000000000001
-11.94341495698213 9.7508272667107878 -3.4834546657842491
-6.284406379208507 18.925280567040758 -14.329887773183696
5.8248239436619702 12.36003521126761 -16.95598591549296
4.0020053475935837 12.724598930481283 -27.163770053475936
-11.975592304022898 0.61718874224836995 -52.291222769915727
-7.0281413612565444 -0.34816753926701505 -43.096204188481678
-12.149529042386186 19.446624803767662 -58.253139717425434
-15.68125 15.914903846153846 -63.550721153846155

#44 facets of Convex_hull_d
volume = 4.2219055836678221
volume = -10.701471020535099
volume = 2.3153283816128289
volume = -3.6005607890361326
volume = 2.0772894233538821
volume = 4.6396036394550322
volume = -3.0243793960069945
volume = 13.370016375022979
volume = -21.575693264420977
volume = -0.67223234993848491
volume = 1.9175177429992551
volume = 5.0155975575471121
volume = 3.8767684740944079
volume = -16.583184281209686
volume = -49.764845372909214
volume = -10.598273100958961
volume = 0.57091137666105574
volume = -10.281427473464277
volume = -0.18433129873133228
volume = -0.16489141225609397
volume = -0.44974122000486844
volume = 9.4445822791426703
volume = -10.526025989642317
volume = -10.696736136396757
volume = 52.109225243358757
volume = 9.8388741148137147
volume = -0.15135087649631598
volume = -7.3678998521983647
volume = 0.01685407082427156
volume = -3.2297349743583288
volume = -0.79287503183270813
volume = 19.350912458459891
volume = -14.04099280400566
volume = 16.467447309524555
volume = 30.54501593165638
volume = 14.574605384995623
volume = 7.9875380437041033
volume = -3.1689040189612645
volume = 50.62508758474371
volume = -13.009379470508497
volume = -52.772620443661779
volume = -51.817457678509186
volume = 2.0502413029071263
volume = 19.45361003281203

#44 facets of Polygon_3
volume = -4.2219055836678221
volume = -10.701471020535099
volume = -2.3153283816128289
volume = -3.6005607890361326
volume = -2.0772894233538821
volume = -4.6396036394550322
volume = -3.0243793960069945
volume = -13.370016375022979
volume = -21.575693264420977
volume = -0.67223234993848491
volume = -1.9175177429992551
volume = -5.0155975575471121
volume = -3.8767684740944079
volume = -16.583184281209686
volume = -49.764845372909214
volume = -10.598273100958961
volume = -0.57091137666105574
volume = -10.281427473464277
volume = -0.18433129873133228
volume = -0.16489141225609397
volume = -0.44974122000486844
volume = -9.4445822791426703
volume = -10.526025989642317
volume = -10.696736136396757
volume = -52.109225243358757
volume = -9.8388741148137147
volume = -0.15135087649631598
volume = -7.3678998521983647
volume = -0.01685407082427156
volume = -3.2297349743583288
volume = -0.79287503183270813
volume = -19.350912458459891
volume = -14.04099280400566
volume = -16.467447309524555
volume = -30.54501593165638
volume = -14.574605384995623
volume = -7.9875380437041033
volume = -3.1689040189612645
volume = -50.62508758474371
volume = -13.009379470508497
volume = -52.772620443661779
volume = -51.817457678509186
volume = -2.0502413029071263
volume = -19.45361003281203


----- Original Message ----- From: "Sylvain Pion" <>
To:
<>
Sent: Friday, June 15, 2007 4:23 PM
Subject: Re: [cgal-discuss] Question about Convex_hull_d


dmyan a écrit :
Dear All,

I met a bug when I use Convex_hull_d. The definition of Convex_hull_d is:

... ...
#ifdef CGAL_USE_GMP
#include <CGAL/Gmpz.h>
typedef CGAL::Gmpz RT;
#else
#include <CGAL/double.h>
typedef double RT;
#endif

typedef CGAL::Cartesian<RT> Kernel_3;
typedef CGAL::Convex_hull_d_traits_3<Kernel_3> Kernel_d_3;
typedef CGAL::Convex_hull_d<Kernel_d_3> Convex_hull_d_3;

The data set is:
5.4361319340329839 0.87316341829085353 14.380209895052474
12.478861788617886 -2.5150406504065037 13.921544715447153
8.1532447224394033 16.332290852228301 19.792025019546518
4.7625437572928817 15.355309218203033 19.143440573428904
13.611111111111112 -4.685185185185186 15.148148148148149
-8.887931034482758 -5.4407327586206904 25.87715517241379
14.149106733852499 -8.4063215758131076 17.882959230416862
15.960000000000001 -8.5999999999999996 18.280000000000001
-15.306924101198401 -4.4600532623169107 32.117842876165106
-46.605550500454967 19.207916287534125 67.943130118289361

When the 4th point(4.7625437572928817 15.355309218203033 19.143440573428904) is inserted, an error is occured.
Could anyone help me to check what's the problem? Thanks very much.
btw: I use VC7.1, and the version of CGAL is 3.3.

Try changing Gmpz to Gmpq, and make sure you have GMP installed.

--
Sylvain Pion
INRIA Sophia-Antipolis
Geometrica Project-Team
CGAL, http://cgal.org/
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss






Archive powered by MHonArc 2.6.16.

Top of Page