Skip to Content.
Sympa Menu

cgal-discuss - Re: Re: [cgal-discuss] Coplanar Points in a 3D Triangulation

Subject: CGAL users discussion list

List archive

Re: Re: [cgal-discuss] Coplanar Points in a 3D Triangulation


Chronological Thread 
  • From: Juan Carlos Lopez Alfonso <>
  • To:
  • Subject: Re: Re: [cgal-discuss] Coplanar Points in a 3D Triangulation
  • Date: Thu, 19 Jan 2012 16:13:26 +0100

Hi Sebastien and  Laurent:

Please, see these links below with my code and the input file of 3D points:

http://dl.dropbox.com/u/2516160/main.cpp
http://dl.dropbox.com/u/2516160/CubeSmall.txt

When I run my code, the test (if (CGAL::orientation(p1, p2, p3, p4) == CGAL::COPLANAR)) is never satisfied, but when I compute the Jacobian is equal to 0.000000000000, is to say, that the 4 points of several thetraedra are coplanar. Maybe Laurent have reason, but How can I solve this problem? Could you give me suggestions?

Thank you for all and waiting your answer
Juan Carlos

On Thu, Jan 19, 2012 at 3:41 PM, Laurent Rineau (GeometryFactory) <> wrote:
Le jeudi 19 janvier 2012 15:12:16 Juan Carlos Lopez Alfonso a écrit :
> Hi Sebastien:
>
> To detect that points are coplanar, I have computed the jacobian of each
> thetraedra:
>
> //for each thetraedra !!!
> ........
> Tetrahedron t = T[i];
>
> Vertex p1 = cit->vertex(0);
> Vertex p2 = cit->vertex(1);
> Vertex p3 = cit->vertex(2);
> Vertex p4 = cit->vertex(3);
>
> double Jacobian =
> (p2.x - p1.x) * (p3.y - p1.y) * (p4.z - p1.z) + (p3.x - p1.x) * (p4.y -
> p1.y) * (p2.z - p1.z) + (p4.x - p1.x) * (p2.y - p1.y) * (p3.z - p1.z)
>  - (p4.x - p1.x) * (p3.y - p1.y) * (p2.z - p1.z) - (p3.x - p1.x) * (p2.y -
> p1.y) * (p4.z - p1.z) - (p2.x - p1.x) * (p4.y - p1.y) * (p3.z - p1.z);
> ........

That way of detecting coplanarity is subject to rounding errors. Probably you
have almost-coplanar points in your data set, but in reality, using a
certified arithmetic, there are not coplanar.

--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory           http://www.geometryfactory.com/
Release Manager of the CGAL Project       http://www.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