## RE: [Vxl-users] vnl_angle()

 RE: [Vxl-users] vnl_angle() From: Andrew Fitzgibbon - 2001-10-29 20:16:30 ```I hate to ask, but are any test cases run on vxl? ```

 [Vxl-users] vnl_angle() From: Amitha Perera - 2001-10-29 19:10:16 ```Hi all The current implementation of angle in vnl_vector.txx is acos( abs( cos_angle(a,b) ) ) Why is the abs there? Thanks, Amitha. ```
 Re: [Vxl-users] vnl_angle() From: Peter Vanroose - 2001-10-29 19:54:08 ```> The current implementation of angle in vnl_vector.txx is > acos( abs( cos_angle(a,b) ) ) > > Why is the abs there? Apparently this is meant to give "symmetric" output, i.e., angle(a,b) == angle(b,a). Should probably be documented. Peter. ```
 Re: [Vxl-users] vnl_angle() From: Amitha Perera - 2001-10-29 20:03:37 ```> Apparently this is meant to give "symmetric" output, i.e., > angle(a,b) == angle(b,a). By definition of the cos_angle, it is already symmetric: cos_angle(a,b) = cos_angle(b,a) = a.b/(|a||b|). The current implementation gives ^ / / A / B <--------/..... B as the "angle", which is the smallest angle provided the "vectors" are undirected. Is this what is intended? I think it should simply be acos( a.b / |a||b| ) since that is what most people refer to as the angle between two vectors. Amitha. ```
 RE: [Vxl-users] vnl_angle() From: Andrew Fitzgibbon - 2001-10-29 20:15:58 ```Amitha: > I think it should simply be > acos( a.b / |a||b| ) > since that is what most people refer to as the angle between two > vectors. Agreed. ```
 Re: [Vxl-users] vnl_angle() From: Amitha Perera - 2001-11-08 18:44:01 ```Forgive my ignorance: how is the angle between two complex vectors defined? Is it acos( |a.b| / |a||b| ) ? If so, is there a clean way to compute the norm for complex types, and not compute the norm for real types? And does this lead to an inconsistency in the semantics of the function call? On Mon, Oct 29, 2001 at 08:13:33PM -0000, Andrew Fitzgibbon wrote: > > Amitha: > > I think it should simply be > > acos( a.b / |a||b| ) > > since that is what most people refer to as the angle between two > > vectors. > > Agreed. ```
 RE: [Vxl-users] vnl_angle() From: Andrew Fitzgibbon - 2001-10-29 20:16:30 ```I hate to ask, but are any test cases run on vxl? ```
 Re: [Vxl-users] vnl_angle() From: Peter Vanroose - 2001-10-29 20:48:16 ```> By definition of the cos_angle, it is already symmetric: > cos_angle(a,b) = cos_angle(b,a) = a.b/(|a||b|). Sure; sorry about the misunderstanding. I meant "non-oriented" instead of "symmetric". ```
 Re: [Vxl-users] vnl_angle() From: Amitha Perera - 2001-11-11 15:37:22 ```[vnl] angle(a,b) now returns acos( a.b / |a||b| ), but is not instantiated for complex-valued vectors, since we lack an implementation for acos(complex). Amitha. On Mon, Oct 29, 2001 at 03:03:29PM -0500, Amitha Perera wrote: > > Apparently this is meant to give "symmetric" output, i.e., > > angle(a,b) == angle(b,a). > > By definition of the cos_angle, it is already symmetric: > cos_angle(a,b) = cos_angle(b,a) = a.b/(|a||b|). The current > implementation gives > > ^ > / > / > A / B > <--------/..... > > B as the "angle", which is the smallest angle provided the "vectors" > are undirected. Is this what is intended? I think it should simply be > acos( a.b / |a||b| ) > since that is what most people refer to as the angle between two > vectors. > > Amitha. ```
 RE: [Vxl-users] vnl_angle() From: Andrew Fitzgibbon - 2001-10-29 20:05:18 ```> Apparently In the sense of "obviously", or that you have other information? A. ```