Angle
Author |
Message |
Flikerator
|
Posted: Wed Apr 19, 2006 7:15 am Post subject: Angle |
|
|
If im given three coordinates how do I find the angle of the three points? (That they make with each other).
Like (2,1) (3,0) (5,7)
At (3,0) the forumula for the angle would be- |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Andy
|
Posted: Wed Apr 19, 2006 9:59 am Post subject: (No subject) |
|
|
ever heard of cosine law?
this shouldnt be in general programming.
moved |
|
|
|
|
![](images/spacer.gif) |
MysticVegeta
![](http://www.geocities.com/ohsoinsane/my_avatar.JPG)
|
Posted: Wed Apr 19, 2006 1:52 pm Post subject: (No subject) |
|
|
Find distance between them (Math.Distance)
Name the sides, A, B, C;
A^2 = B^2 + C^2 - 2*B*C*cos(A)
plugin, vals, find cos A, use inverse get angle |
|
|
|
|
![](images/spacer.gif) |
codemage
![](http://usera.imagecave.com/codemage/codemage-small.gif)
|
Posted: Thu Apr 20, 2006 9:05 am Post subject: (No subject) |
|
|
That's odd. I distinctly remember the last time I used COS law, and it was thinly sliced cabbage. |
|
|
|
|
![](images/spacer.gif) |
zylum
![](http://compsci.ca/v3/uploads/user_avatars/1689129126468091c334ee0.gif)
|
Posted: Thu Apr 20, 2006 10:42 am Post subject: (No subject) |
|
|
ha ha ha! ![Doh! Doh!](images/smiles/eusa_doh.gif) |
|
|
|
|
![](images/spacer.gif) |
Flikerator
|
|
|
|
![](images/spacer.gif) |
Andy
|
Posted: Thu Apr 20, 2006 12:04 pm Post subject: (No subject) |
|
|
why dont you check if it's an obtuse angle and if it is just find the reflex of the reflex |
|
|
|
|
![](images/spacer.gif) |
|
|