Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[mg26320] sum of the angle in a 4th dim triangle

0 views
Skip to first unread message

Ken Levasseur

unread,
Dec 12, 2000, 3:06:36 AM12/12/00
to
Jacky:

Your problem is that there shouldn't be an absolute value in your formula for
the angle.

Using
angle[x_, y_] := ArcCos[(x.y)/(Sqrt[Plus @@ (x^2)]Sqrt[Plus @@ (y^2)])]

I get a bit over 94 degrees for the angle at Q. That accounts for your
discrepancy.

In[16]:=
angle[R - Q, P - Q]

Out[16]=
\!\(ArcCos[\(-\(1\/14\)\)]\)

In[18]:=
N[%] (180/Pi)

Out[18]=
94.096

Ken Levasseur
UMass Lowell
http://faculty.uml.edu/klevasseur/courses/m419/m419.html


Jacky Vaillancourt wrote:

> Hi, i have a basic problem. I can't see my mistake can somebody help me?
>
> Here's the problem:
> I want to calculate each angle of the triangle formed by those three dots.
> P:=(0,1,0,1), Q:=(3,2,-2,1), R:=(3,5,-1,3)
>
> u:=PQ -> (3-0,2-1,-2-0,1-1) -> (3,1,-2,0)
> v:=QR -> (3-3,5-2,-1-(-2),3-1) -> (0,3,1,2)
> w:=PR -> (3-0,5-1,-1-0,3-1) -> (3,4,-1,2)
>
> The formula to have the angle between tho vector is:
> ARCCOS(ABS(DOTPROD(u,v))/(length(u)*length(v))
>
> The formula to calculate the length is SQRT(a^2+b^2+c^2+d^2)
>
> So, the angle between u and v is:
> ARCCOS(ABS(15)/(SQRT(14)*SQRT(30))) = 42.95 deg
>
> the angle between v and w is:
> ARCCOS(ABS(-15)/(SQRT(30)*SQRT(14)))= 42.95 deg
>
> the angle between u and w is:
> ARCCOS(ABS(-1)/(SQRT(30)*SQRT(14)))= 85.9 deg
>
> Here's the problem 180-85.9-42.95-42.95= 8.2 deg
>
> I'm missing 8.2 deg....
>
> I hope you'll understand what i wrote, i'm not used to write in englis...
>
> Thanks
>
> Jacky


0 new messages