These patterns are [epicycloids][1], and the construction is attributed to Cremona, see for example [this webpage][2].

The question is about the envelope of a system of lines: one draws a line through the points $(\cos t, \sin t)$ and $(\cos nt, \sin nt)$ for every $t$. If $F(x,y,t)=0$ is an equation of this line, then the envelope is found from resolving the system of equations
$$
F(x,y,t)=0, \quad \frac{\partial F}{\partial t}(x,y,t)=0
$$
with respect to $t$. The result is
$$
\gamma(t) = \frac{1}{n+1}
\begin{pmatrix}
\cos nt + n\cos t\\ \sin nt + n\sin t
\end{pmatrix}
$$
which parametrizes the trajectory of a point on a circle of radius $\frac{1}{n+1}$ rolling on a circle of radius $\frac{n}{n+1}$.

This can also be proved geometrically by looking at the instantaneous motion of the point (it is rotated about the point of contact of the two circles).


  [1]: https://en.wikipedia.org/wiki/Epicycloid
  [2]: https://www.mathcurve.com/courbes2d.gb/epicycloid/epicycloid.shtml