Original Post
🔒 Locked
finding the angle
Advertisement
your three points define a triangle. Use the law of cosines:
a2 + b2 - 2ab cosA = c2
where A is the angle between sides a and b. so, in your case, you want to know a, so you rewrite the equation:
(a2 + b2 - c2)/2ab = cosA
arccos((a2 + b2 - c2)/2ab) = A
a2=dx12 + dy12 + dz12
b2=dx22 + dy22 + dz22
dx1 = x1 - x
dy1 = y1 - y
dz1 = z1 - z
dx2 = x2 - x
dy2 = y2 - y
dz2 = z2 - z
check the time on my post. If it is more than 10 minutes old, then I don't have any corrections pending.
Do you use your powers for good or for awesome?
|My site | Association of Computing Machinery
[edited by - capn_midnight on September 2, 2003 4:05:21 PM]
[edited by - capn_midnight on September 2, 2003 4:09:02 PM]
a2 + b2 - 2ab cosA = c2
where A is the angle between sides a and b. so, in your case, you want to know a, so you rewrite the equation:
(a2 + b2 - c2)/2ab = cosA
arccos((a2 + b2 - c2)/2ab) = A
a2=dx12 + dy12 + dz12
b2=dx22 + dy22 + dz22
dx1 = x1 - x
dy1 = y1 - y
dz1 = z1 - z
dx2 = x2 - x
dy2 = y2 - y
dz2 = z2 - z
check the time on my post. If it is more than 10 minutes old, then I don't have any corrections pending.
Do you use your powers for good or for awesome?
[edited by - capn_midnight on September 2, 2003 4:05:21 PM]
[edited by - capn_midnight on September 2, 2003 4:09:02 PM]
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement