Skip to content

Instantly share code, notes, and snippets.

@boki1
Created September 22, 2023 12:40
Show Gist options
  • Save boki1/b9f210da0ccfcfb79f8cef84e4487068 to your computer and use it in GitHub Desktop.
Save boki1/b9f210da0ccfcfb79f8cef84e4487068 to your computer and use it in GitHub Desktop.
Draw a diagram illustrating roots of unity in the case of C_n
\begin{tikzpicture}
\coordinate (center) at (0, 0);
\def\radius{2cm}
\def\n{5}
\pgfmathsetmacro\angle{360/\n}
\pgfmathsetmacro\startangle{90}
\foreach \i in {0,...,4} {
\coordinate (point\i) at ({\startangle+\angle*\i}:\radius);
\coordinate (label\i) at ({\startangle+\angle*\i}:\radius+0.25cm);
\node[anchor={\startangle+\angle*\i-90}] at (label\i) {$\omega_5^{\i}$};
}
\draw[salmon, thick] (point0) -- (point1) -- (point2) -- (point3) -- (point4) -- cycle;
\draw[black, thick] (center) circle (\radius);
\draw[->] (-2.5,0) -- (2.5,0) node[right] {$\text{x}$};
\draw[->] (0,-2.5) -- (0,2.5) node[above] {$\text{y}$};
\end{tikzpicture}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment