Here is a function $f(x,y)$ which is 0 inside the square $C=[\pm1,\pm1]$, and outside that square has value equal to the Euclidean distance $d( p, C )$ from $p=(x,y)$ to the boundary of $C$. [I am trying to follow Pietro's suggestion, as far as I understand it.] It is not a surface of revolution (but it is centrally symmetric). Are its gradient descent paths geodesics? I think so... <br /> ![Function, Contours][1] <br /> _Left above_: $f(x,y)$. _Right above_: Level sets of $f$. _Below_: $\nabla f$. <br /> ![Gradient][2] <br /> And here (_below_) is a closeup of the function defined using squared distance, as per Will's suggestion: <br />![alt text][3] [1]: http://cs.smith.edu/~orourke/MathOverflow/GradientSquare.jpg [2]: http://cs.smith.edu/~orourke/MathOverflow/VectorFieldSquare.jpg [3]: http://cs.smith.edu/~orourke/MathOverflow/GradientSquare2.jpg