Is there a general formula for $\sin( {p \over q} \pi)$?

Virtually everyone knows the basic values of the unit circle, $\sin(\pi) = 0; \ \ \sin({\pi \over 2}) = 1; \ \ \sin({\pi \over 3}) = {\sqrt{3} \over 2} \\$ And other values can be calculated through various identities, like $\sin({\pi \over 8}) =\frac{1}{2} \sqrt{2 - \sqrt{2}}\\$ Does there exist a general formula for $\sin({p\over q} \pi)$ for rational ${p \over q}$ as an algebraic number?

Too long for a comment ...

Perusing the "Exact Values [...] in Increments of 3 Degrees" list that @Claude referenced (the main idea is to use the known valus for $\sin\frac{\pi}{3}$, $\sin\frac{\pi}{4}$ and $\sin\frac{\pi}{5}$ and combining them using the sine addition formula), I found that the sines have this common (if not-necessarily-insightful) form: $$\sin \left(k\cdot 3^\circ\right) = \frac{\sqrt{2}}{4}\;\sqrt{\;4\;\pm_1\;\sqrt{\phi\,(a\phi+b\overline{\phi})}\;\pm_2\;\sqrt{\overline{\phi}\,(c\phi+d\overline{\phi})}\;}$$ where $\phi := \frac{1}{2}(\sqrt{5}+1)$ and $\overline{\phi} := \phi^{-1} = \frac{1}{2}(\sqrt{5}-1)$ are the golden ratio and its reciprocal.

$$\begin{array}{r|cccccc} \theta\; & \pm_1 & a & b & \pm_2 & c & d \\ \hline 0^\circ & - & 16 & 0 & + & 0 & 16 \\ 3^\circ & - & 3 & 0 & - & 1 & 1 \\ 6^\circ & - & 3 & 3 & - & 0 & 1 \\ 9^\circ & - & 4 & 4 & - & 0 & 0 \\ 12^\circ & - & 1 & 0 & - & 3 & 3 \\ 15^\circ & - & 12 & 0 & + & 0 & 12 \\ 18^\circ & - & 4 & 0 & + & 0 & 0 \\ 21^\circ & - & 1 & 1 & - & 0 & 3 \\ 24^\circ & - & 3 & 3 & + & 0 & 1 \\ 27^\circ & + & 0 & 0 & - & 4 & 4 \\ 30^\circ & - & 4 & 0 & + & 0 & 4 \\ 33^\circ & - & 3 & 0 & + & 1 & 1 \\ 36^\circ & + & 0 & 0 & - & 0 & 4 \\ 39^\circ & - & 1 & 1 & + & 0 & 3 \\ 42^\circ & + & 1 & 0 & - & 3 & 3 \\ 45^\circ & + & 0 & 0 & + & 0 & 0 \end{array}$$ $\sin(90^\circ-\theta)$ uses the same $a$, $b$, $c$, $d$ as $\sin \theta$, but each of $\pm_1$ and $\pm_2$ is inverted. For instance, \begin{align} \sin 24^\circ &= \frac{\sqrt{2}}{4}\;\sqrt{\;4\;-\;\sqrt{\phi\,(3\phi+3\overline{\phi})}\;+\;\sqrt{\overline{\phi}\,(0\phi+1\overline{\phi})}\;} \\[6pt] \sin 66^\circ &= \frac{\sqrt{2}}{4}\;\sqrt{\;4\;+\;\sqrt{\phi\,(3\phi+3\overline{\phi})}\;-\;\sqrt{\overline{\phi}\,(0\phi+1\overline{\phi})}\;} \end{align}

For $\theta = 0^\circ$, $30^\circ$, $45^\circ$, $60^\circ$, $90^\circ$, these reduce to a commonly-known pattern:

\begin{align} \sin 0^\circ = \sqrt{\;\color{red}{0}\;}/2 \\ \sin 30^\circ = \sqrt{\;\color{red}{1}\;}/2 \\ \sin 45^\circ = \sqrt{\;\color{red}{2}\;}/2 \\ \sin 60^\circ = \sqrt{\;\color{red}{3}\;}/2 \\ \sin 90^\circ = \sqrt{\;\color{red}{4}\;}/2 \\ \end{align}

This is a subset of the cases in which $ab=cd=a-d=0$, which can be written in this form (noting that we happen to have $a=d=4n$): $$\frac{\sqrt{2}}{4} \sqrt{\;4\;\pm\;\sqrt{\phi\cdot 4n \phi}\;\mp\;\sqrt{\overline{\phi}\cdot 4n \overline{\phi}}\;} \;=\; \frac{1}{2}\sqrt{\;2\;\pm\;(\phi-\overline{\phi})\sqrt{n}\;} \;=\; \frac{1}{2}\sqrt{\;2\;\pm\;\sqrt{n}\;}$$ so that we have \begin{align} \sin 0^\circ &= \sqrt{\;2-\sqrt{\color{red}{4}}\;}\;/2 \\ \sin 15^\circ &= \sqrt{\;2-\sqrt{\color{red}{3}}\;}\;/2 \\ \color{blue}{\sin 22.5^\circ} &= \sqrt{\;2-\sqrt{\color{red}{2}}\;}\;/2 \\ \sin 30^\circ &= \sqrt{\;2-\sqrt{\color{red}{1}}\;}\;/2 \\ \sin 45^\circ &= \sqrt{\;2-\sqrt{\color{red}{0}}\;}\;/2 \\ \sin 60^\circ &= \sqrt{\;2+\sqrt{\color{red}{1}}\;}\;/2 \\ \color{blue}{\sin 67.5^\circ} &= \sqrt{\;2+\sqrt{\color{red}{2}}\;}\;/2 \\ \sin 75^\circ &= \sqrt{\;2+\sqrt{\color{red}{3}}\;}\;/2 \\ \sin 90^\circ &= \sqrt{\;2+\sqrt{\color{red}{4}}\;}\;/2 \\ \end{align} with $22.5^\circ$ and $67.5^\circ$ thrown in to complete the pattern attributed to Ernesto La Orden on Ron Knott's page.

The multiples of $9^\circ$ (excluding $0^\circ$ and $90^\circ$) are characterized by having one or the other (or both) of the inner radicals vanish (that is, $(a+b)(c+d)=0$). These lead to more reductions from Knott's page, although the collection lacks the kind of "counting" pattern shown above.

Update. Inspired by this answer, which lists cosines of multiples-of-$3^\circ$ without using an outer square root, I've devised this unified form:

$$\sin(k\cdot 3^\circ) = \frac{m \sqrt{n}}{4} \left(\; ( a\psi + b\overline{\psi} ) \sqrt{\phi\,( e\phi + f\overline{\phi} )} \;+\; ( c\psi + d\overline{\psi} ) \sqrt{\overline{\phi}\,( g\phi + h\overline{\phi} )} \;\right)$$ where $$\{\phi,\overline{\phi}\} := \frac12\left(\sqrt{5}\pm 1\right) \quad \{\psi,\overline{\psi}\} := \frac12\left(\sqrt{3}\pm 1\right)$$ (with the overlined character using the "$-$").

$$\begin{array}{r|cc|cc:cc|cc:cc} \theta\; & m & n & a & b & c & d & e & f & g & h \\ \hline 0^\circ & 2 & 1 & + & - & - & + & 0 & + & + & \color{red}{0} \\ \hline 3^\circ & 1 & 2 & 0 & - & + & 0 & + & + & \color{red}{0} & + \\ 6^\circ & 1 & 1 & - & + & + & + & + & \color{red}{0} & + & + \\ 9^\circ & 1 & 2 & + & - & - & + & + & \color{red}{0} & + & + \\ 12^\circ & 1 & 1 & + & - & - & - & + & + & \color{red}{0} & + \\ \hdashline \star\;15^\circ & 1 & 2 & 0 & + & 0 & + & 0 & + & + & \color{red}{0} \\ \hline 18^\circ & 2 & 1 & 0 & 0 & + & - & + & + & \color{red}{0} & + \\ \hline 21^\circ & 1 & 2 & 0 & - & + & 0 & + & \color{red}{0} & + & + \\ 24^\circ & 1 & 1 & + & + & - & + & + & \color{red}{0} & + & + \\ 27^\circ & 1 & 2 & + & - & - & + & + & + & \color{red}{0} & + \\ \hdashline \star\; 30^\circ & 1 & 1 & + & - & + & - & 0 & + & + & \color{red}{0} \\ \hdashline 33^\circ & 1 & 2 & 0 & + & + & 0 & + & + & \color{red}{0} & + \\ \hline 36^\circ & 2 & 1 & 0 & 0 & + & - & + & \color{red}{0} & + & + \\ \hline 39^\circ & 1 & 2 & + & 0 & 0 & - & + & \color{red}{0} & + & + \\ 42^\circ & 1 & 1 & + & + & - & + & + & + & \color{red}{0} & + \\ \hdashline \star\;45^\circ & 1 & 2 & + & - & + & - & 0 & + & + & \color{red}{0} \\ \hdashline 48^\circ & 1 & 1 & + & - & + & + & + & + & \color{red}{0} & + \\ 51^\circ & 1 & 2 & 0 & + & + & 0 & + & \color{red}{0} & + & + \\ \hline 54^\circ & 2 & 1 & + & - & 0 & 0 & + & \color{red}{0} & + & + \\ \hline 57^\circ & 1 & 2 & + & 0 & 0 & - & + & + & \color{red}{0} & + \\ \hdashline \star\; 60^\circ & 1 & 1 & + & + & + & + & 0 & + & + & \color{red}{0} \\ \hdashline 63^\circ & 1 & 2 & + & - & + & - & + & + & \color{red}{0} & + \\ 66^\circ & 1 & 1 & + & - & + & + & + & \color{red}{0} & + & + \\ 69^\circ & 1 & 2 & + & 0 & 0 & + & + & \color{red}{0} & + & + \\ \hline 72^\circ & 2 & 1 & + & - & 0 & 0 & + & + & \color{red}{0} & + \\ \hline \star\; 75^\circ & 1 & 2 & + & 0 & + & 0 & 0 & + & + & \color{red}{0} \\ \hdashline 78^\circ & 1 & 1 & + & + & + & - & + & + & \color{red}{0} & + \\ 81^\circ & 1 & 2 & + & - & + & - & + & \color{red}{0} & + & + \\ 84^\circ & 1 & 1 & + & + & + & - & + & \color{red}{0} & + & + \\ 87^\circ & 1 & 2 & + & 0 & 0 & + & + & + & \color{red}{0} & + \\ \hline 90^\circ & 2 & 1 & + & - & + & - & 0 & + & + & \color{red}{0} \end{array}$$

Some observations:

• $n$ alternates $1$ and $2$.
• $m=2$ at, and only at, multiples of $18^\circ$. Everywhere else, $m=1$.
• There are only three $(e,f,g,h)$ patterns: $\alpha := (0++0)$, $\beta:=(++0+)$, $\gamma := (+0++)$. They cycle $\alpha\beta\gamma\gamma\beta\alpha\beta\gamma\gamma\beta\ldots$. (Observe the zig-zagging red "$0$" in the $(e,f,g,h)$ columns.)
• In particular, the $(e,f,g,h)$ patterns of complementary angles match.
• Except as marked with $\star$, $(a,b)$ and $(c,d)$ for $\theta$ are $\pm(c,d)$ and $\pm(a, b)$ for $90^\circ-\theta$, with one "$+$" and one "$-$". For those marked $\star$ (aka, the non-extreme multiples of $15^\circ$), there's no clear pattern. Is there an unambiguous, unified relation between expressions for complementary angles? (It was so easy in the earlier table!)
• Beware: I already caught (and fixed) one typo in the table.

There is not so much a formula, as there is an algorithm, due to Gauss. In his Disquisitiones Arithmeticae (sorry, I couldn't find a free English translation), he gives a number-theoretic view of the roots of unity (and thus, trigonometric functions). In particular, he outlines in one section a recursive method for determining explicit radical expressions of roots of unity.

Modern methods that improve on the asymptotic complexity of Gauss's algorithm exist, however. In this paper, A. Weber presents an improvement of Gauss's original algorithm that hinges on an efficient way to evaluate the "recursive step" in the original method. A Maple implementation of this improved method is presented in the paper.