I am trying to build a spiral-type function (2D) in Python such as shown below:
What I am trying to obtain is a kind of maze/labyrinth in which the minimum of the function is located near the center of the vortex.
I would like to obtain the mathematical expression which defines that spiral-type function, avoiding using polar coordinates if that's possible (atan?).
Figure function:
I don't think it would be easy to avoid polar coordinates in this case. A spiral is typically a function
$$\phi\colon\mathbb R\to\mathbb C, \theta\mapsto \rho(\theta)e^{i\theta}$$
where $\rho:\mathbb R\to\mathbb R_{\ge 0}$ is monotonically increasing. Given such a spiral one way to get a function that is identically $0$ on the spiral, and positive elsewhere would be by given by the distance of a point to nearest spiral arm. For example you could define:
$$f(r,\theta) = \min_{k\in\mathbb Z} |r-\rho(\theta+2k\pi)|^2$$