Re: sum of the angle in a 4th dim triangle
- To: mathgroup at smc.vnet.net
- Subject: [mg26332] Re: [mg26320] sum of the angle in a 4th dim triangle
- From: Ken Levasseur <Kenneth_Levasseur at uml.edu>
- Date: Tue, 12 Dec 2000 02:54:45 -0500 (EST)
- References: <200012110238.VAA10097@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
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
- References:
- sum of the angle in a 4th dim triangle
- From: "Jacky Vaillancourt" <jacky_1970@videotron.ca>
- sum of the angle in a 4th dim triangle