Subject: CGAL users discussion list
List archive
- From: "Laurent Rineau (CGAL/GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] Compute angle between two vectors
- Date: Fri, 03 Mar 2017 12:50:03 +0100
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:Ko0kxRTB65cjSyaDa2zfGLPQUNpsv+yvbD5Q0YIujvd0So/mwa64ZBGN2/xhgRfzUJnB7Loc0qyN4v2mAjBLus7J8ChbNscTB1ld0YRetjdjKfDGIHWzFOTtYS0+EZYKf35e1Fb/D3JoHt3jbUbZuHy44G1aMBz+MQ1oOra9QdaK3Izkn9y1rpbcagENiDumaq5pNz23qx/Qv48Ym9hMMKE0n1Htq2ZSduJKjVlpI1+agl68zeiZ2NlM/iNVtu475uBJWrn9ZbV5B/QMCD07KW0z+IvxtB/ORBan7XQVViMRiBUeUFuN1w3zQpqk6niyjeF6wiTPZcA=
- Organization: GeometryFactory
Le Friday, March 3, 2017 11:30:48 AM CET Thomas Holzmann a écrit :
> Hi,
>
> I'm using the epek kernel (without sqrt).
>
> I'm having two Vector_3 and want to compute the angle between them.
>
> I would usually compute the dot product between the normalized vectors,
> but I cannot compute the normalized vectors without sqrt.
>
> Is there also an (exact) way to compute the angle between the two
> vectors in CGAL?
There is no way to compute exact angles. As far as I know, the acos, asin,
atan, atan2 trigonometric functions are always using floating point numbers.
Even if you only want to compute the cosine or the sinus of the angle, then
you need the exact sqrt function.
However, if you only want to compare two angles, or compare an angle with a
constant (actually it will compare cosines and sinuses), then you can do it
exactly without sqrt.
--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory http://www.geometryfactory.com/
Release Manager of the CGAL Project http://www.cgal.org/
- [cgal-discuss] Compute angle between two vectors, Thomas Holzmann, 03/03/2017
- Re: [cgal-discuss] Compute angle between two vectors, Laurent Rineau (CGAL/GeometryFactory), 03/03/2017
- Re: [cgal-discuss] Compute angle between two vectors, Thomas Holzmann, 03/03/2017
- Re: [cgal-discuss] Compute angle between two vectors, Laurent Rineau (CGAL/GeometryFactory), 03/03/2017
- Re: [cgal-discuss] Compute angle between two vectors, Thomas Holzmann, 03/03/2017
- Re: [cgal-discuss] Compute angle between two vectors, Laurent Rineau (CGAL/GeometryFactory), 03/03/2017
- Re: [cgal-discuss] Compute angle between two vectors, Thomas Holzmann, 03/03/2017
- Re: [cgal-discuss] Compute angle between two vectors, Laurent Rineau (CGAL/GeometryFactory), 03/03/2017
Archive powered by MHonArc 2.6.18.