Calculating interior angles of quadrilateral

725 Views Asked by At

stupid question... but:

I've a polygon which has the points $(a_x,a_y),(b_x,b_y),(c_x,c_y), (d_x,d_y)$

How can I calculate each interior angle of this quadrilateral? I know that in sum, it has to be $360^\circ$.

Thanks

2

There are 2 best solutions below

4
On BEST ANSWER

If you know about vectors, the dot product can help you out here.

Recall $\textbf{a.b}=a b \cos(\theta)$. Rearrange this to get your desired result.

2
On

You can use the law of cosines. Let $p=|a-b|, q=|a-c|, r=|b-c|$ so you have drawn the diagonal from $b$ to $c$ and have a triangle with side lengths $p,q,r$. Then if $\theta$ is the angle at $a$, you have $r^2=p^2+q^2-2pq \cos \theta$