Path: news.mathworks.com!not-for-mail
From: "Bruno Luong" <b.luong@fogale.fr>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Angle between two vectors
Date: Fri, 28 Dec 2007 21:38:03 +0000 (UTC)
Organization: FOGALE nanotech
Lines: 35
Message-ID: <fl3qbq$l6j$1@fred.mathworks.com>
References: <ef5ce9c.-1@webcrossing.raydaftYaTP> <fjj9nj$fia$1@fred.mathworks.com> <fjk0tg$jli$1@fred.mathworks.com> <fl377q$4ip$1@fred.mathworks.com> <fl3moi$pvc$1@fred.mathworks.com> <fl3nhq$3tc$1@fred.mathworks.com>
Reply-To: "Bruno Luong" <b.luong@fogale.fr>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1198877883 21715 172.30.248.35 (28 Dec 2007 21:38:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 28 Dec 2007 21:38:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 390839
Xref: news.mathworks.com comp.soft-sys.matlab:443750


"baris kazar" <mbkazar.nospam@gmail.com> wrote in message 
>   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 z.
> i dont have access y and z at the same time. 
> hope that this problem statement is clear.

Assuming a human being (e.g., all the birds, or you) can go
anywhere in R3, and can look in any direction (a fair
assumption isn't it?).

VIEW1: Goto the point (0,-1,0) look toward the direction
(0,1,0): you see angle(x,y)=-pi/4, and angle(x,z)=pi/4.

VIEW2: Goto the point (0,+1,0) look toward the direction
(0,-1,0): you see angle(x,y)=+pi/4, and angle(x,z)=-pi/4.

In both cases you have angle(x,y) = -angle(x,z) modulo 2*pi,
as your wish expressed above with "theta".

BUT
CASE1/VIEW1: angle(x,y)=-pi/4; angle(x,z)=pi/4; angle(y,z)=pi/2.

CASE2/VIEW2: angle(x,y)=+pi/4; angle(x,z)=-pi/4;
angle(y,z)=-pi/2.
 
ALL angles change the sign when you change the side. You
simply cannot decide which is a *right* way, because the
opposite is also right as much.

THERE IS NO UNIQUE WAY TO DEFINE ANGLE IN R3.

Bruno