A square grid modulo \((x, y) \sim (x + a,\ y + b)\).
To transform this to a spiral, we first rotate/scale square \((a, b)\) to sit at \((0,\ 2\pi)\). Then we apply the complex exponential map \((x, y) \mapsto (e^{x}\cos y,\ e^{x}\sin y)\).
For more details, see this article and this video.