This question stems from this tex.stackexchange answer, relating to the drawing of a coil in tikz.
The commenter parametrises a straight 2D coil by $$x = D_1\cos(t\pi), y = D_2t + D_3\sin(t\pi),$$ with $D_1$ the radius, $2D_2$ the "wavelength" of one loop and $D_3$ a measure of how wide the loops are. This can be seen in the 1st plot here (desmos.com graph).
I was wondering how one would use this parametrisation to draw a curved coil.
Could one simply use the same equations for $(x, y)$ and write them in polar coordinates $(r, \theta)$, or it is more involved than that?
You can do this in polar coordinates: $$ \theta=t\pm\frac{w}{R_1}\cos\frac{2\pi R_1 t}d,\\ r=R_1+R_2\sin\frac{2\pi R_1 t}d,\\ $$ where $R_1,R_2$ are two radii of coil torus, $d$ is wavelength and $w$ is coefficient of how “coiled” the coil is drawn. You can try to play with parameters.