# How to identify surfaces of revolution

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.

• @Hoseyn -- I searched a little, and couldn't find any references. Commented Dec 4, 2013 at 14:49
• @Hoseyn -- maybe you are asking why this is interesting/important. The answer is that surfaces of revolution are easier to handle computationally, 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. If that's not what you meant, please try asking again. Commented Dec 4, 2013 at 14:53
• Was both which I mean. I'm now working on it. Commented Dec 4, 2013 at 15:02
• An arbitrary inertia tensor (@ Centroid) seems like a promising start for candidate axes of revolution. It will result in 3 eigenvals (roots of the tensor's cubic char poly). When roots repeat there is some topological symmetry in the inertia tensor. Case 1: 2 roots (1 repeating) such as a cylinder (doesn't have to be a circular cross section). The non-repeating eigenvalue's eigen vector is the candidate axis of revolution. I would look at the cross sections normal to this candidate axis for constant curvature in each section. Case 2: 1 root all repeating (such as a cube or sphere). Commented Dec 5, 2013 at 3:57
• I agree with you that physicists like to exploit any symmetry to simplify the problem (in this case to work in cylindrical coordinates given by the axis of rotation). But usually the process can't be reversed. You can't expect any symmetry in general surfaces, even in those having pretty inertia tensors. Commented Dec 13, 2013 at 10:21

You can reduce it to an algebraic problem as follows:

The definition of a surface of revolution is that there is some axis such that rotations about this axis leave the surface invariant. Let's denote the action of a rotation by angle $\theta$ about this axis by the map $\vec x\mapsto \vec R_\theta(\vec x)$. With your surface given as a level set $f(\vec{x})=0$, the invariance condition is that $f(\vec R_\theta(\vec x))=0$ whenever $f(\vec{x})=0$, for all $\theta$.

In particular, we can differentiate this with respect to $\theta$ to get $\vec\nabla f(\vec R_\theta(\vec x))\cdot \frac{\partial}{\partial\theta}\vec R_\theta(\vec x)=0$, which at $\theta=0$ gives $\vec\nabla f(\vec x)\cdot \vec k(\vec x)=0$, where $\vec k(\vec x)=\left.\frac{\partial}{\partial\theta}\vec R_\theta(\vec x)\right|_{\theta=0}$ is the vector field representing the action of an infinitesimal rotation. (If the language of differential geometry is familiar, this is a Killing vector field).

So with this language established, what we need to check is whether there is any Killing field $\vec k(\vec x)$ associated to a rotation, which is orthogonal to the gradient of $f$ everywhere on the surface (i.e., whenever $f(\vec x)=0$). In fact, this will be not just necessary, but also sufficient, since (intuitively) any rotation can be built from many small ones.

Luckily, it's quite straightforward to write down the most general Killing field: if $\vec x_0$ is a point on the axis of rotation, and $\vec a$ a unit vector pointing along the axis, we have $\vec k(\vec x)=\vec a \times (\vec x-\vec x_0)$. (Note that this is a degenerate parametrization, since we can pick any point on the axis, corresponding to shifting $\vec x_0$ by a multiple of $\vec a$, and also send $\vec a$ to $-\vec a$, to give the same rotation).

To summarize: the question has been recast as "are there any solutions $\vec x_0, \vec a$ to $\vec a \times (\vec x-\vec x_0)\cdot\vec\nabla f(\vec x)=0$, which hold for all $\vec x$ such that $f(\vec x)=0$?".

(You could also write the equation as $\det[\vec a, \, \vec x-\vec x_0, \,\vec\nabla f(\vec x)]=0$).

For your example, I got Mathematica to use this method. I let $\vec x_0=(x_0,y_0,0)$, taking $z_0=0$ to remove some degeneracy, and $\vec a=(a_x,a_y,a_z)$, giving 5 unknowns for the axis. I then found four points on the surface, by solving $f(x,y,z)=0$ with $y=z=0$ and $x=z=0$. Then I got it to solve $\vec a \times (\vec x-\vec x_0)\cdot\vec\nabla f(\vec x)=0$ for the four points, and $|\vec a|^2=1$ (5 equations for the 5 unknowns), getting a unique solution up to the sign of $\vec a$. I then substituted the solution into $\vec a \times (\vec x-\vec x_0)\cdot\vec\nabla f(\vec x)$ for general $\vec x$, getting zero, so the solution indeed gave an axis of revolution. It is simplified in this case because all the level sets of $f$ give a surface of revolution about the same axis, so this last step did not require assuming $f(\vec x)=0$.

• A practical note on how this might work: there's a four dimensional space of possible axes, so to pin a solution down you'll need four equations. So find four points on your surface, and generically this will give you a unique solution (up to the degeneracy already mentioned). Now check that this solution works for all points on the surface. Commented Dec 13, 2013 at 11:51
• Thanks for your recent additions. What is the nature of the 5 equations you had to solve? Are they linear? In the answer by zyx below, he ends up with (homogeneous) linear equations, and his solution seems somewhat related to yours. Commented Dec 15, 2013 at 2:04
• Your condition $\det[\vec a, \, \vec x-\vec x_0, \,\vec\nabla f(\vec x)]=0$) says that three vectors are coplanar: the axis vector, a vector from the axis point to the surface point $\vec x_0$, and the surface normal at $\vec x_0$. It seems geometrically clear to me that this property characterizes surfaces of revolution. Your arguments justify this, but I would have believed it anyway. Commented Dec 15, 2013 at 2:26
• Corrrecting typos in my previous comment: I should have said that the three coplanar vectors are the axis vector $\vec a$, a vector $\vec x - \vec x_0$ from the axis point $\vec x_0$ to the surface point $\vec x$, and the surface normal at $\vec x$. Commented Dec 15, 2013 at 4:48
• As zyx describes below, the main equation is linear in either $\vec x_0$ or $\vec a$ separately, but includes terms with the product of the two. There are several options to constrain the redundancy; in the generic case these could be chosen to be linear (e.g. the third components of $\vec a$ and $\vec x_0$ could be chosen as 1 and 0 respectively, as long as the axis is not parallel to the $x-y$ plane). Commented Dec 18, 2013 at 15:33

If you are working numerically you are probably not interested in degenerate cases, so let's assume that the surface is "generic" in a suitable sense (this rules out the sphere, for example). As you point out, it is helpful to use Gaussian curvature $K$ because $K$ is independent of presentation, such as the particular choice of the function $f(x,y,z)$. The good news is that it is possible to calculate $K$ directly from $f$ using a suitable differential operator. For curves in the plane this is the Riess operator from algebraic geometry; for surfaces it is more complicated. This was treated in detail in an article by Goldman:

Goldman, Ron: Curvature formulas for implicit curves and surfaces. Comput. Aided Geom. Design 22 (2005), no. 7, 632-658.

See here

Now the punchline is that if this is a surface of revolution then the lines $\gamma$ of curvature are very special: they are all circles (except for degenerate cases like the sphere). In particular, $\gamma$ has constant curvature and zero torsion $\tau$ as a curve in 3-space. If $f$ is a polynomial, one should get a rational function, say $g$, for curvature, and then the condition of constant curvature for $\gamma$ should be expressible by a pair of equations.

• Thanks for your answer. Regarding spheres ... we can ignore all polynomial equations of degree two, because these are just quadrics, and they're easy to classify using well-known methods based on eigenvalues. Commented Dec 13, 2013 at 7:19
• Sounds good in principle. But I haven't read Ron Goldman's paper, yet, so I don't know how hard it is to compute lines of curvature. As I mentioned in my hint for differential geometry folks, I think you have to do a bit more work, though. Just because the lines of curvature are circles, I don't think this guarantees that we have a surface of revolution. I think cyclides have the same property, for example. But, if we can find the lines of curvature, we should be able to show that they are all coaxial circles, as I said, and this proves that we have a surface of revolution. Commented Dec 13, 2013 at 7:26
• Your web site seems to be dead, so I can't download the paper. I'll try to find a copy elsewhere, though. Commented Dec 14, 2013 at 2:25
• I found a copy of Goldman's paper, and read it. He tells us how to calculate principal curvatures at some given point on an implicit surface. Then what next? I suppose we have to construct differential equations that describe the lines of curvature, and solve them. Is that your suggestion? Commented Dec 14, 2013 at 4:20
• @bubba: no, this shouldn't depend on solving differential equations. I was proposing to do everything algebraically in the case when the surface is given by a polynomial equation. Thus, the differential operator expressing the Gaussian curvature should give an explicit expression in terms of the coefficients of the polynomial. The constancy of that expression defines the line of curvature "implicitly" by means of an explicit relation. Then we have two implicit equations: one for the surface, and one for the line of curvature. At this point one looks for yet another operator that gives the... Commented Dec 15, 2013 at 10:22

The defining equation should have an infinitesimal symmetry that, after a translation of the coordinate system to be centered on the axis of rotation, is linear and skew-symmetric (it is an infinitesimal rotation) with coefficients independent of $(x,y,z)$. In other words,

$f(x,y,z)=0 \hskip15pt$ implies, after ignoring terms of order $(dt)^k$ with $k > 1$, that $$f(x+ (\alpha + Py + Qz) dt, y + (\beta - Px + Rz)dt, z + (\gamma -Qx -Ry) dt) = 0$$

for constants $P,Q,R$ (the entries of the skew symmetric matrix) and $(a,b,c)$ (the new center of coordinates, which can be any point on the axis of rotation). The triple of constants $(\alpha,\beta,\gamma)$ is defined to equal $(-Pb-Qc, Pa-Rc, Qa +Rb)$; this is just the correction term resulting from the coordinate change since we have for example $x = a + (P(y-b) + Q(z-c)) dt$ as the effect on $x$ of an infinitesimal rotation through an angle proportional to $dt$.

As $f(x,y,z)$ is zero, this is a set of equations on the degree $1$ term (in $dt$) of the power series of $F(x + ..., y+ ..., z + ...)$ that must vanish.

The vanishing is not only numerical, but up to whatever order of vanishing $f(x,y,z)$ has, in case of a non-reduced equation like $f(x,y,z)=(1 + g^2) h(x^2+y^2)^2$ where $g$ and $h$ are polynomials. The equation can be seen as taking place in a ring of functions modulo $f(x,y,z)$, or as matching the asymptotic expansions up to the correct order. If there is no foolproof ability to reduce the equation before starting, picking several generic points $(x_i,y_i,z_i)$ can fail because partial derivatives of $f$ might vanish everywhere $f$ does. For polynomials you could factor $f$ before starting.

The equations are linear (and homogeneous, so invariant under scaling) in $P,Q,R$ but contain bilinear products like $Pa$. The condition on $(P,Q,R)$ is invariant under changes of $(a,b,c)$ corresponding to different choice of point on the axis of rotation, so if there is a solution there is one with $a=0$, or $b=0$, or $c=0$. Taking these two facts into consideration the dimension of the solution space is $6 - 1 - 1 = 4$ which is the same as the number of parameters to define a line in $3$-dimensions. The degree of the system is $2$ after imposing $abc=0$ and requiring $P=1$ (or the same for $Q$ or $R$, if no solution has $P=1$); this reflects the twofold redundancy that reversing both the orientation of the rotation axis and the direction of the rotation does not change the rotation.

All in all this ends up being similar to the answer of Holographer using random points, since the variables parameterizing the problem are equivalent. If $f$ is polynomial you can compute exactly in a computer algebra system without picking random points; $C[x,y,z]/(f=0)$ will be an infinite-dimensional vector space over $C$ (or whatever other field of coefficients) and after exhausting the relations in low degree (getting a numerical degree $2$ system that is solved for the constants $P,Q,R,a,b,c$ after imposing different cases of $abc=0$ and $(P-1)(Q-1)(R-1)=0$) one can test the solution to see whether the degree $1$ term with $dt$ is divisible by $f(x,y,z)$ or not.

• Thanks very much. I'm sorry to be so dense, but there are several things I don't understand. I don't see what "set of homogeneous linear equations" you're refering to. And, if I solved these equations, how would I then get the rotation axis from these solutions. Commented Dec 14, 2013 at 10:41
– zyx
Commented Dec 18, 2013 at 10:18
• Thanks. Still hard to understand (for me), and seems to be roughly the same approach suggested by Holographer, but explained in a different way. Commented Dec 18, 2013 at 23:57

This is not really a full answer, just some thoughts that should get you started.

Suppose we have already identified a candidate axis of revolution for the surface. How do we tell whether the surface was really created by revolution? Well, we can simply change coordinates to the new coordinate system given by the candidate axis and any two orthogonal vectors and see whether the equation for the surface in the new coordinates will only depend on two variables.

Now, let's make the above more precise. Instead of the qualitative statement "we have/haven't a surface of revolution" let's consider some kind of function $R$ (depending on the axis of revolution and perhaps some other parameters to be specified) that vanishes precisely when we have a surface of revolution. Can we find such a function? You bet we can! Enter Fourier transformation.

You might be familiar with the fact that the Fourier transform of constant function on a circle is the delta function. Explicitly $\hat 1 = \delta_0$ (there should also be some normalization factor but let's disregard that). So our function $R$ can be $\lVert \delta_0 - \hat f\rVert$ where $\lVert \cdot \rVert$ is any reasonable norm and $\hat f$ is the Fourier transform of surface's equation around the candidate axis of rotation. The reason for this is that $f$ doesn't depend on one of the variables in the new coordinates. Another way to say this is that it is constant in that variable or that it's Fourier transform is a delta function.

Summing up, we have reduced the problem to minimizing function $R$. Arguably there's still quite some work involved in computing the Fourier transform of $f$ around arbitrary axis and finding a good norm to use. Good news is that there are surely packages for calculating the Fourier transform and that you can truncate the norm to include just first few terms (so called low frequency ones) of the Fourier transform.

This would be an answer for Computer Graphics/Computer Science folks: Check the following recent paper which provides algorithmic tools for identifying patches of surface of revolution on unorganized point clouds:

https://arxiv.org/pdf/2312.09373

The algorithm builds the aforementioned patches in the form of planar quad meshes with desired resolutions. Furthermore, the algorithm detects a generalization of surfaces of revolution where the axis of rotation is no longer fixed and its foot points can trace a curve while the profile curve at the same time can be scaled. This generalized surfaces (which include the surfaces of revolution as special instances) are called trapezoidal surfaces (T-surfaces).