Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] normal vector of a facet

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] normal vector of a facet


Chronological Thread 
  • From: Monique Teillaud <>
  • To:
  • Subject: Re: [cgal-discuss] normal vector of a facet
  • Date: Tue, 09 Mar 2010 08:57:26 +0100

Hi,

Be careful that the order in which vertices must be taken on the facet depends on the parity of its index f.second.
This is due to the fact that cyclic permutations of (0,1,2,3) are not all positive. As far as I can remember, I documented this in the user manual of the 3d triangulation data structure chapter.

Best regards,
Monique Teillaud

Ramin H wrote:
Hi everyone,
I have the handle to a facet of a 3D triangulation and would like to find the normal vector of the facet. This is how I am doing it but it looks like the normal is incorrect.

// const Facet& f is passed to this function in the function argument ...
const Point_3& p1 = f.first->vertex((f.second+1)&3)->point();
const Point_3& p2 = f.first->vertex((f.second+2)&3)->point();
const Point_3& p3 = f.first->vertex((f.second+3)&3)->point();
Vector_3 v1 = CGAL::normal(p1, p2, p3);

Am I missing something?

-Ramin

--
Monique Teillaud
INRIA Sophia Antipolis - Méditerranée
http://www.inria.fr/sophia/members/Monique.Teillaud/



Archive powered by MHonArc 2.6.16.

Top of Page