From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Angle between two vectors
Date: Sat, 29 Dec 2007 05:53:08 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 96
Message-ID: <fl4nc4$47i$>
References: <ef5ce9c.-1@webcrossing.raydaftYaTP> <fjj9nj$fia$> <fjk0tg$jli$> <fl377q$4ip$> <fl3moi$pvc$> <fl3nhq$3tc$> <fl3r7p$5nt$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: 1198907588 4338 (29 Dec 2007 05:53:08 GMT)
NNTP-Posting-Date: Sat, 29 Dec 2007 05:53:08 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1223357
Xref: comp.soft-sys.matlab:443788

"Roger Stafford" 
<> wrote in 
message <fl3r7p$5nt$>...
> "baris kazar" <> wrote in 
message <fl3nhq$3tc
> $>...
> > Hi Roger,-
> >   yes, this is one step closer to what i need but not 
> > exactly. Let's take a numeric example:
> > x=(1,0,0); y=(1,0,1) and z=(1,0-1)
> > let's call the angle between x and y theta.
> > Then i wanna get 2pi-theta for the angle between x and 
> > i dont have access y and z at the same time. 
> > hope that this problem statement is clear.
> > Thanks much for your reply
> > Best regards
> --------
>   You will have to try harder to explain your problem, 
if I am to understand 
> you, Baris.  The example you gave has x, y, and z all in 
the same plane.  You 
> didn't state previously that all your vectors are 
coplanar.  Are they?  But 
> whether they are or not, this doesn't explain how you 
would define the angle 
> theta between x and y.  It could be plus pi/4 or it 
could be minus pi/4 (or 
> 7/4*pi.)  Which one would you choose and according to 
what criterion?  It 
> would depend on which side of the plane, in this case 
the x-z plane, is 
> regarded as its positive side - along the plus y-axis, 
or along the negative 
> side of the y-axis.  Also it depends on whether you are 
moving from x 
> towards y or from y towards x if you are adhering to 
right-hand cross 
> product direction conventions.
>   Select two arbitrary vectors in three-dimensional 
space (x1,y1,z1) and 
> (x2,y2,z2) and try to think of a consistent way of 
defining the angle between 
> them without reference to any other vector that would 
allow this quantity to 
> range over the full four quadrants, 0 to 2*pi.  I think 
you will find this a 
> difficult thing to do in any way that could reasonably 
be considered canonical.  
> In two dimensions, there is a clearly defined 
counterclockwise direction from 
> vector x to vector y which would give you the range you 
desire.  In three 
> dimensions, you lose the sense of what is 
a "counterclockwise" direction.  You 
> can go from x to y along either of two great circle 
paths and one direction will 
> give the supplement angle to the opposite direction.  If 
you always select the 
> shortest path, then your angle range is restricted to 
>   If one vector of each pair is restricted to a 
particular fixed vector, as your 
> previous wordage seemed to imply, I still don't see what 
criterion you wish to 
> use to define these angles.  For example, you can move 
from the fixed vector 
> by one degree in all possible directions giving a cone, 
but which half of these 
> angles should be adjusted so as to be the supplements 
(that is 359 degrees,) 
> of those on the opposite side?  If you are restricting 
your vectors to all be 
> coplanar, then which side of such a plane is to be 
considered its "positive" 
> side?
> Roger Stafford

Hi Roger,-
 these are excellent questions.
one can choose to look at the plane from +ive infinity 
(above) or from -ive infinity (below).

I know that in 3D there is no notion of CW or CCW. However,
you can define it locally wrt a point/vector as long as 
they are on a plane by defining from which side you are 
looking at.

Anyways, i dont wanna confuse anyone any more.
I will find another solution to this problem.
Best regards