$$z(X) = \frac{\sin(\pi/n)}{\cos\!\left(\frac{(1-s)\pi}{2n}\right)} \int_0^X e^{\left( i \frac{\pi}{n} \sum_{k=1}^{2n} \frac{1 + (-1)^{k+1} s}{1 + e^{-(x-k)\theta}} \right)} dx$$
โ Graph that from $X = 0$ to $X = 2n$ and you get an $n$-pointed star.
$s$ controls the star-ness. $\theta$ controls how sharp the corners are.
โ n-gon
ยท
gear โ
Geometry derivation