In the context of this question you may define for a given number $n$ some (Fourier) coefficients by these sensible equations (as you have asked for):
$a^{(n)}_k \sim \begin{cases} +k^{-2} & \text{ for } k \equiv 1 \pmod n\\ +k^{-2} & \text{ for } k \equiv (n-1) \pmod n\\ 0 & \text{ otherwise } \end{cases}$
$b^{(n)}_k \sim \begin{cases} +k^{-2} & \text{ for } k \equiv 1 \pmod n\\ -k^{-2} & \text{ for } k \equiv (n-1) \pmod n\\ 0 & \text{ otherwise } \end{cases}$
Then you calculate the functions $a^{(n)}(t)$ and $b^{(n)}(t)$ like this:
$a^{(n)}(t) \sim \sum_{k=0}^\infty a^{(n)}_k\cos(kt)$
$b^{(n)}(t) \sim \sum_{k=0}^\infty b^{(n)}_k\sin(kt)$
Finally you draw the curve $t \mapsto a^{(n)}(t) + ib^{(n)}(t)$ in the complex plane – and get your desired regular $n$-gon.
As an example for $n=4$:
See more examples in the gallery here.
