Suppose the user has
chosen some set of *key points*,
where each key point
is specified by a value
along some preferred axis (say the z axis)
and some radius in the
other two axes (say the x and y axes).
Your job is to create a set of
sections of second order surfaces
passing through these key points,
such that,
when pieced together, the surfaces
appear to form one continuous
surface of revolution.

The user adjusts the radius at
a key point (z,r),
as shown by the big black dots
in the applet below.
The trick
is to compute the square of
that radius, giving (z,r^{2}).
Then you can fit a smooth curve
consisting of two parabolas
in the interval between successive key points.

Each parabola will describe a section of a paraboloid of revolution of the form:

for some constants A and B. When you take the square root in the radial direction, you get a surface equation of the form:

Substituting x^{2}+y^{2} for r^{2}
gives the quadratic surface equation:

Geometrically, this means that each paraboloid of revolution section is converted into either a section of an ellipsoid (when A is negative) or a section of a hyperboloid (when A is positive and B is not zero), or a section of a cone (when A is positive and B is zero).