# How to draw polygons with angles (LaTeX Tikz)

Just learnt some amazing angle-drawing techniques using LaTeX Tikz.

Although cumbersome to code, the benefit of using LaTeX to draw diagrams is that it matches the font of your document, and is easier to customize and edit. Also, it is “vector graphics” in the sense that even if you zoom in, it is in perfect resolution.

Important: In order to use Tikz to draw angles you need to load the following packages:

\usepackage{tikz}
\usetikzlibrary{calc,patterns,angles,quotes}

## Sample Tikz code for drawing the above figure (polygon angles)

\begin{figure}[htbp]
\begin{center}
\begin{tikzpicture}
\coordinate (v0) at (-2.2,1.2);
\coordinate (v1) at (0,0);
\coordinate (v2) at (2.2,1.8);
\coordinate (v3) at (0,3);

\filldraw
(v1) circle (2pt) node[align=left, below] {$v_1$}
-- (v2) circle (2pt) node[align=center, below, right] {$v_2$}
-- (v3) circle (2pt) node[align=left, above] {$v_3$}
-- (v0) circle (2pt) node[align=left, above, left] {$v_0$}
-- (v1);
\pic [draw, -, "$\alpha_0$", angle eccentricity=1.5] {angle = v1--v0--v3};
\pic [draw, -, "$\alpha_1$", angle eccentricity=1.5] {angle = v2--v1--v0};
\pic [draw, -, "$\alpha_2$", angle eccentricity=1.5] {angle = v3--v2--v1};
\pic [draw, -, "$\alpha_3$", angle eccentricity=1.5] {angle = v0--v3--v2};
\end{tikzpicture}
\caption{}