Computer Animation of Smooth Surfaces

Nelson L Max

Education Development Center, University of Georgia

1970

UAIDE

Abstract

When a smooth surface is projected onto a picture plane, singularities may appear at points where the line of sight is tangent to the surface. There are two types of such singularities: folds and cusps. We discuss how they arise and how they affect the visibility of the surface. Other types of singularities can occur when the surface is not in the most general, or generic position. During a deformation, the set of singularities changes, and we examine the most general types of such changes.

In a paper [1] at last year's UAIDE conference, a method was given for representing a smooth surface (with possible self-intersections) by the projections of dots randomly scattered across it. Extra three dimensional cues can be added by rotational motion, by perspective projection, and by brightening the dots in the foreground. However, for a sufficiently complicated surface the jumble of dots at different levels may become confusing, and it may be necessary to eliminate the hidden dots which lie on hidden surfaces. The discussion below concerns this hidden dot problem, and is valid for either parallel or perspective projection.

The most naive solution would be to draw a line from each dot back toward the eye. If this line intersected the surface in any other points, the dot would be hidden. However, finding the intersection, of a line with even a simple surface is a difficult computation, and when repeated for the hundreds of dots required for a surface, this process takes impractical amounts of computer time.

A more practical technique is to find whole regions of the surface which are visible or hidden. These regions are bounded by the visual edges consisting of points where the line of sight becomes tangent to the surface. In the language of differential topology, these are points where the projection of the surface is singular and the rest of the paper concerns a mathematical analysis of such singularities.

Suppose u and v are coordinates on a patch of surface about the point (u,v) = (0,0). Since this surface sits in three dimensional space, it is represented by three functions X(u,v), Y(u,v) and Z(u,v) of the parameters u and v. If the surface is smooth and non-singular in space, then the two tangent vectors

X u , Y u , Z u and X v , Y v , Z v

are linearly independent. Assume the Z- axis points away from the eye, and consider a projection of the three dimensional space (X,Y,Z) onto the (x,y) picture plane, given by two functions x(X,Y,Z) and y(X,Y,Z). For parallel projection we use x = X, y = Y, and for a point perspective projection, x=X/Y, y=Y/Z.

The composite function f, from (u,v) to (x,y), will now become singular, wherever the two tangent vectors project to the same direction in the (u,v) plane. At a singular point, the Jacobian determinant vanishes.

(1) x u y u x v y v = x u y v - x v y u = 0

For example, consider the surface in Figure 1 generated by a parabola in the YZ plane. Its equation is X = u, Y = v2, Z = v.

Figure 1

Under parallel projection, we get:

x = u, y = v2, so equation (l) becomes

(2) 1 0 0 2 v = 2 v = 0

Thus, the line v=0 is the set of singular points of the projection, which in this case are all fold points. Since equation (l) imposes one algebraic condition, the set of singular points of f will in general be a smooth curve in the (u,v) plane. The idea of in general can be made more precise, with Thorn's idea of generic, defined in [2]. Roughly, a generic surface has as small a set of singularities as any nearby surface, and thus has no singularities which could be eliminated by a small deformation.

This idea can be seen by looking at the surface of the previous example rotated 90 degrees to an end on position. Its equation then becomes the X = v, Y = v2, Z = u. Under parallel projection we get x - v, y = v2, and equation (1) becomes

0 0 1 2 v = 0

which is always satisfied.

The whole surface is squashed down to a curve, and every point is singular. This is not generic. However, a small deformation or sideways push to

(3)    X = v + ε u, Y = v2, z = u

for arbitrarily small ε, will change this situation back to the generic one, with a fold at v = 0. Similarly, any function can be arbitrarily well approximated by a generic one.

In the generic situation, the solution to (l) will be a curve in the (u,v) plane, which we may parametrize as φ(t) = ( u(t), v(t)). This becomes a non-singular space curve (X(t), Y(t), Z(t)), but under the projection to the picture plane, it may acquire singularities, where

d #966; d t = d x d t , d y d t , d Z d t

lies on the line of sight and projects to zero, i.e.

d f . #966; d t = 0

We may then assume, in general, that

d 2 f . #966; d t 2 = 0

Such a point is called an exceptional singular point, or cusp. For example the surface in figure 2 has equations

     X = u, Y = V3 - uv, Z = v
(4)  x = u, y = v3 - uv

Equation (1) becomes

1 - v 0 3 v 2 - u = 0

with solution u = 3v2, the curve of singular points in the (u,v) plane. Choosing v as the parameter, the function f sends this curve to the curve x = 3v2, v = 2v3 in the (x,y) plane, which has a cusp singularity at v = 0. The point u = 0, v = 0 is called a cusp or an exceptional point of this function f. Hassler Whitney has proved [3] that for a generic function f from the plane to the plane, every singularity is either a fold or a cusp, i.e., using suitable coordinates (u,v) and (x,y), f can be put in the form of (2) or (4).

Now suppose we can compute all the visual edges, or curves of singularities on the surface. They divide the surface up into a number of regions, and their projections also divide the (x,y) plane into a number of regions. If there are no cusps, the problem is now simple, since visibility of a dot depends only on which region of the surface contains it and which region of the picture plane contains its projection.

The situation near a cusp is a bit more complicated.

Figure 2:

The wavy curves in figure 2 cross-sections of constant u = X, and the other curve, whose projection has a cusp, is the visual edge. The region u > 3v2 is the downward fold on the right of the cusp and is invisible. However, there are points of the region u < 3v2 in back of this surface which are also hidden. These are the points for which X > 0, and Y < 2(X/3)1.5. Here y = 2(x/3)1.5 is the equation of the heavy solid line which is the projection of the visible part of the fold curve. These points are in the same region of the surface, and of the (x,y) plane, as nearby points in front of the fold, which are not hidden. Therefore special care must be taken near a cusp, and extra regions must be created.

Suppose a deforming surface is to be animated. The above procedure is sufficient to find the hidden dots for each frame once the visual edges and cusps are computed and the appropriate regions identified, as long as the visibility of each region is specified.

It would be foolish to reestablish this specification for each frame, since the regions themselves merely deform from frame to frame. This is true because any surface sufficiently near a fixed generic surface is also generic, and its projection and singularities have the same topological character, so that corresponding regions can be identified.

However, during a deformation it may be necessary to pass through positions which are non-generic, but unavoidable. Here is an example. Let φ be an infinitely differentiable even function of x, so that (0) = 1, and φ(x) = 0 if x ≥ 1. Let α > 1 be the maximum of dφ/dx attained for x = β, with -1 < β < 0. Consider the following family of surfaces, with t as parameter, under parallel projection.

(5)  X = u, Y = v - t φ(u) φ(v), Z = v

When t = 0, we have a simple flat plane. When t = 1, we have pushed a dimple down into the plane, creating two folds joining two cusps (see figure 3).

Figure 3:

As t increases, the dimple gets smaller. When t = 1/α, we have an isolated singular point u = 0, v = β, into which the cusps and folds coalesce before disappearing.

This particular surface is not generic. Arbitrarily near it there are generic ones of two different kinds, those with a dimple, and those without singularities. There is no deformation from the dimple when t = 1 to the flat plane when t = 0 which is generic for all t. However, in general, near any deformation one can find a generic deformation which has generic surfaces for all but finitely many values of t. For these values, such as t = 1/α above, the surface is of a special type which is as generic as possible, having only one point where something strange happens. These special surfaces are sometimes called of codimension one type, because the set of all of them is of codimension one in the infinite dimensional space of all possible surfaces.

If we look at the above example, the set of singularities forms a surface in the three dimensional space (u,v,t). This surface is folded by f, and the crease is the locus of the exceptional or cusp points. As the cusp points come smoothly together when they disappear, the image of this exceptional curve is smooth. However, this need not always be the case for a map from a three dimensional space. Consider the one parameter family of surfaces below, and its parallel projection

       X = u, Y = uv2 + tv - v4, Z = v
(6)    x = u, y = uv2 + tv - v4

When t = 0, we get a surface

(7)    x = u, y = uv2 - v4

with two humps to the right of the cusp, both joining at the same time into a single hump on the left. (See figure 4.)

Figure 4

When t is negative, the term tv has the effect of tilting the surface so that the hump in front is raised, and the visual edge (labeled 2) defining its top joins with the one on the left to form a nonsingular visual edge, while the top of the rear hump, 3, meets the bottom of the trough, 4, in a cusp.

When t is positive the tilt is in the opposite direction, and the edges join in a different way, with the cusp in front.

The surface of singularities in (u,v,t) space, found from equation (1), is

     y/v = 2uv + t -4v3 = 0,
 or  t = 4v3 - 2uv.

Substituting this in (6) we get

(8)    x = u, y = 3v4 - uv2

which has the same form as (7), and is thus singular.

By switching the role of u and t in (6), we get another family

(9)   x = u, y = tv2 + UV - v4

When t = 0, we get the surface

    x = u, y = uv - v4

which has a fold along the edge

y = 3 x/44/3

When t < 0, we also get a single fold, but when t increases beyond zero, two cusps form. (See figure 5.)

Figure 5

In a generic deformation, the only change in the structure of the folds and cusps will occur in situations such as equations (5), (6), or (9).

However, changes can occur in the projections of the visual edges, even without the edges themselves changing. For example as sphere B passes behind sphere A in figure 6, a new region C must be created, bounded by the folds of A and B.

Figure 6

If the above sorts of changes could be incorporated in specifications of which regions were visible, a running tally could be kept from frame to frame. This would only work for generic deformations. Now if a deformation is picked randomly from nature, one can show, using measure theory, that the probability of its being generic is 1. However, surfaces chosen at random by programmers are often too simple, too symmetrical, and in too special a position, like the end on surface discussed above. As ε varies from -1 to 1 in equation (3) the paraboloid will pass a non-generic position for ε = 0. Of course, the deformation could be changed slightly to avoid this by tilting the surface away from the horizontal.

For another example, consider a torus or donut tilted through the horizontal position. At the instant it becomes horizontal, four of the changes of type (6) take place at once, while in a generic deformation they should happen one at a time. This could, be avoided by making the torus irregularly bulged, instead of perfectly symmetrical and round. Also, the use of point perspective instead of parallel projection may be enough to counteract any unnatural symmetry. However, non-generic cases are all too abundant, and methods which should work, in general still seem to have a habit of breaking down on the simplest examples.

REFERENCES

[1] Nelson Max, Computer animation for Mathematical films. Proceedings of the eighth annual UATDE meeting. Coronado, California, November, 1968.

[2] Rene Thom, Les singularities des applications differentiable. Annales L'Institut Fourier. 6 (1955-56] 43 87.

[3] Hassler Whltney, On the singularities of mappings of Euclidian spaces. I. Mappings of the plane into the plane. Annals of Math (2) 62 (1953) 374-410.