Given a surface $f(x,y,z)=0$, how would you determine whether or not it's a surface of revolution, and find the axis of rotation?

The special case where $f$ is a polynomial is also of interest.

A few ideas that might lead somewhere, maybe:

**(1) For algebra folks:** Surfaces of the form $z = g(x^2 + y^2)$ are always surfaces of revolution. I don't know if the converse is true. If it is, then we just need to find a coordinate system in which $f$ has this particular form. Finding special coordinate systems that simplify things often involves finding eigenvalues. You use eigenvalues to tackle the special case of quadric surfaces, anyway.

**(2) For differential geometry folks:** Surfaces of revolution have a very special pattern of lines of curvature. One family of lines of curvature is a set of coaxial circles. I don't know if this property characterizes surfaces of revolution, but it sounds promising.

**(3) For physicists & engineers:** The axis of rotation must be one of the principal axes for the centroidal moments of inertia, according to physics notes I have read. So, we should compute the centroid and the inertia tensor. I'm not sure how. Then, diagonalize, so eigenvalues, again. Maybe this is actually the same as idea #1.

**(4) For classical geometry folks:** What characterizes surfaces of revolution (I think) is that every line that's normal to the surface intersects some fixed line, which is the axis of rotation. So, construct the normal lines at a few points on the surface (how many??), and see if there is some line $L$ that intersects all of these normal lines (how?). See this related question. If there is, then this line $L$ is (probably) the desired axis of rotation. This seems somehow related to the answers given by Holographer and zyx.

Why is this is interesting/important? Because surfaces of revolution are easier to handle computationally (e.g. area and volume calculations), and easy to manufacture (using a lathe). So, it's useful to be able to identify them, so that they can be treated as special cases.

The question is related to this one about symmetric surfaces, I think. The last three paragraphs of that question (about centroids) apply here, too. Specifically, if we have a bounded (compact) surface of revolution, then its axis of rotation must pass through its centroid, so some degrees of freedom disappear.

If you want to test out your ideas, you can try experimenting with $$ f(x,y,z) = -6561 + 5265 x^2 + 256 x^4 + 4536 x y - 1792 x^3 y + 2592 y^2 + 4704 x^2 y^2 - 5488 x y^3 + 2401 y^4 + 2592 x z - 1024 x^3 z - 4536 y z + 5376 x^2 y z - 9408 x y^2 z + 5488 y^3 z + 5265 z^2 + 1536 x^2 z^2 - 5376 x y z^2 + 4704 y^2 z^2 - 1024 x z^3 + 1792 y z^3 + 256 z^4 $$ This is a surface of revolution, and it's compact. Sorry it's such a big ugly mess. It was the simplest compact non-quadric example I could invent.

If we rotate to a $(u,v,w)$ coordinate system, where \begin{align} u &= \tfrac{1}{9}( x - 4 y + 8 z) \\ v &= \tfrac{1}{9}(8 x + 4 y + z) \\ w &= \tfrac{1}{9}(-4 x + 7 y + 4 z) \end{align} then the surface becomes $$ u^2 + v^2 + w^4 - 1 = 0 $$ which is a surface of revolution having the $w$-axis as its axis of rotation.