This is an example of a function defined in polar coordinates, and how if you compute the gradient without thinking, you might get the cyan arrows, which are wrong, rather than the correct white arrows.

download image
mouse: