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: Ramin H <>
  • To:
  • Subject: Re: [cgal-discuss] normal vector of a facet
  • Date: Fri, 5 Mar 2010 15:24:41 -0500
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=oQ0mG/hA7VgUUaPGQxLnq7Hmn7haIFNNnH3+MhJzy2ptDrVKCV9naebdDAB4+Ko9zP GwUhTM9K6KGn5ZFG+D5VnyhpirEbKtgKClktUQicrvFDskOQqjBRuRq9q8Cyt4brU5lI U6iMC/V40JVVDExhetjZNtEm6OV1J+1AmscvU=

Thanks for responding Laurent.

I am adding a new facet criterion class to mesh_standard_facet_criteria.h

In the do_is_bad(const Facet& f) function, I need to calculate the normal vector of the facet (assuming the normal vector points outwards from the inside of the domain).  Then I will use this normal vector to do some other calculations...

Assuming the right hand rule for finding the direction of the normal, will CGAL::normal(p1, p2, p3) produce a vector that points in the correct direction?

-Ramin

On Fri, Mar 5, 2010 at 3:01 PM, Laurent Rineau (GeometryFactory) <> wrote:
Le Vendredi 05 Mars 2010 20:16:56, Ramin H a écrit :
> 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

Hi Ramin,

Who wrong is the normal vector you get? The computation seems right.

Did you want a *unit* normal vector? Did you want coherent orientations of all
the normal vector you compute?

--
Laurent Rineau, PhD
Release Manager of the CGAL Project       http://www.cgal.org/
R&D
Engineer at GeometryFactory           http://www.geometryfactory.com/

--
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