Suppose I have 3 vertices whose coordinates are A:[x1,y1,z1], B:[x2,y2,z2] and C:[x3,y3,z3]. Is there a simple formula to find the angle between any of the 3 vertices? (say angle ABC?)
Asked
Active
Viewed 6,155 times
2 Answers
1
$$ \cos\left(\vphantom{\Large A}\angle{\rm ABC}\right) = {\left(\vec{A} - \vec{B}\right)\cdot\left(\vec{C} - \vec{B}\right) \over \left\vert\vec{A} - \vec{B}\right\vert\;\left\vert\vec{C} - \vec{B}\right\vert} $$
Felix Marin
- 94,079
0
So you have three vectors $A,B,C$. Now if you want to find the angle $ABC$, then translate $B$ to the origin $O$. In doing that $A$ will transform to $A-B$ and $C$ will transform to $C-B$. Then using the inner product $$(A-B)\dot(C-B)=|A-B||C-B|\cos(ABC)$$
QED
- 12,944