An application of hybrid curve generation to cartoon animation by electronic computers

Miura, T, Iwata, J, Tsuda, J, Hitachi

1967

SJCC

INTRODUCTION

Curve generation techniques are gaining importance in the field of computer graphics. Curve generators using either digital or analog techniques can be built. However it is extremely advantageous to use hybrid techniques by taking advantage of superior analog curve generation capability. This results in small storage requirements for a digital computer and a relatively fast display time.

In this paper, as an application of hybrid curve generation techniques and computer graphics, computer animation problems are dealt with.

Motion picture cartoons and other types of animation require extraordinarily great expenditures of labor, since each individual cartoon frame must be drawn by hand. These frames, each one of which incorporates only minute changes, are then photographed one after another. We have recently developed two computing methods for producing animation: (1) Representing the picture in mathematical equations and moving it by switching the constants of the equations (analog computer method); and (2) having two frames drawn by an animator. The curve indicating the movement between these two frames is then read into the computer. According to the results calculated by the computer, animations between the two frames are machine-drawn (hybrid computer method). The second method offers more advantages from the practical point of view, because it is easier to draw a picture which is faithful to the artist's intention.

Analog computer method

Basic principles

Individual pictures in animated cartoons consist of a multitude of highly complicated lines. However, each individual section of the picture can be simulated by means of relatively simple curves. For example, a curve can be approximated by a series of parabolas. In most cases, each section consists of simple closed curves. Consequently, it is possible to take a circle as the basis of a closed curve, and then to modify it to make a desired pattern.

A circle can be generated by a so-called circle-test circuit, shown in Figure 1. In an analog computer, the modification of a pictorial pattern can be performed simultaneously with the generation of the circle. Thus, it is possible to produce a picture by varying in succession the manner of modification as numerous circles are being produced repeatedly one after another. These are displayed on a cathode ray tube. If slight differences are introduced in the parameters in the transformation circuit for each one of these individual curves, then it will appear as if the picture is moving continuously.

Figure 1 - Circle-test circuit

The chief means of modifying the basic pictorial patterns are as shown in Figure 2.

Figure 2 - Transformation methods

Although all of these are transformations of the coordinates, the procedures of (d) and (e) in Figure 2 have the effect of distorting the coordinate axis. Figure 3 shows how the coordinate grids are changed by these transformations. Thus, if one takes into consideration these transformations of the coordinate grids, one can anticipate the shape which a given pictorial pattern will have after its transformation. In this manner, one can modify the basic circle to produce a large number of desired shapes. Besides modifying circles, it is naturally possible also to begin with other differential equations. For example, one can use a damped oscillation circuit. If this is displayed on the phase plane, one will obtain logarithmic spirals. However, if the decrement is made smaller, it will be possible to black out the area inside the circle. If this process is discontinued before completion, one will obtain a circle with thick lines. Other differential equations for obtaining other solutions are also conceivable. However, just as in the case of modifications, if they are exceedingly complex, they will cease to be practical.

Figure 3 - Transformation of coordinate grid

Examples of actual applications

Figure 4 is a picture of Oba-Q, the hero of a comic strip enjoying popularity in Japan. Figure 5 is a picture of rabbit driving a car. As for the former the truck, eyes, mouth, and legs consist of seven closed curves. The eyeballs are blacked out by spirals, and the hands and the hair are made by conics. The functions of movement, expansion and contraction, modification, etc., can be provided by several potentiometers in the computing circuit This can be done either manually or under the program control of the digital computer. In carrying out these experiments, we used the Hitachi ALS-2000 analog computer, which has an iteration rate of 3 KC.

Figure 4 - Oba-Q displayed on a cathod ray tube
Figure 5 - A rabbit driving a car

Problems of the analog computer method

This method has the advantage that the pictures produced on the cathode ray tube can be moved on real time. However, the method also has two important drawbacks. One is the fact that it is difficult to produce a picture which is faithful to the artist's intention. The second drawback is that in order to obtain complicated pictures the computing circuit itself will become complicated.

Hybrid computer method

General introduction

In this method an animator draws out by hand two separate frames of the cartoon. These two original drawings as well as the curves indicating the movements between the two, are read into the computer. Then the computer generates the intervening frames by interpolation.

A hybrid computer is used for the following reasons. First, input operations can be performed conveniently if the curves are read in an analog fashion. In addition, since the pictures must ultimately be drawn, analog techniques will be necessary in these sections. The curves were represented by means of the coordinates of representative points. Although in this method it is necessary to use a greater amount of data to represent the picture, it is possible to represent even highly complicated curves, and any picture conceived by the animator can be produced easily. The curves can also be modified or revised freely in any way.

Reading in the pictures

As is shown in Figure 6, a curve is represented approximately by suitable sampling points: P1, P2...P7.

Figure 6 - Representation of a curve by point coordinates

The following four types of points will be necessary:

  1. Initial point. This is the point where the curve begins. The pen of the XY recorder is lowered at this point.
  2. Intermediate points. These are the intermediate points along the curve. They ought to be connected smoothly with the points preceding and following them.
  3. Break point. This is an intermediate point on a curve at which the curve bends in a different direction.
  4. Terminal point. This is the point where a curve ends. The pen of the XY recorder is raised at this point.

The pictures are read into the digital computer by means of a series of points, and are then memorized by the computer. Each point includes information concerning the position (the coordinates) and the type of point.

A special curve reader is used. This reader consists of a pen for position detection and a set of function switches. As the pen is moved along the curve, the coordinates of the points are detected electromagnetically and are transformed into digital quantities. The point coordinates are read into the computer by operating the switch. The type of point is distinguished by selecting the appropriate function switch.

Reproducing the pictures

There are various conceivable methods of reproducing a curve by joining together a series of points, for instance the method of joining the points by means of arcs or parabolas. We adopted a method of utilizing analog elements by which it was possible to draw these curves simply and conveniently.

As shown in Figure 7, if one specifies both the positions of each of the points and the tangents of the curves at each of the points, then it. will be possible to reproduce the original curve with almost complete fidelity. However, a prerequisite for this is that the series of points must have been sampled with a sufficient degree of coarseness making possible a faithful representation of the original curve.

Figure 7 - Curves are designated by the positions of the points and the directions of the tangents

The following two processes must be performed:

  1. The tangents must be calculated.
  2. Then one must generate a smooth curve which will pass accurately through the given points and will connect with the given tangents.

The first process is performed by the digital computer, and the second by the analog elements.

Calculation of tangents

In order to calculate the tangents, the smooth curve passing through a given series of points must be expressed by equations. Here we adopted the parabolic approximation. Let us suppose that there are four points: Pi-2, Pi-1, Pi, and Pi+1 as shown in Figure 8. First, we shall draw the parabola li-1, having an axis perpendicular to Pi-2Pi and passing through the three points: Pi-2, Pi-1, and Pi. Let Qi-1,2 be the point of intersection of the tangents of li-1 at point Pi-1, and point Pi. Next, we shall draw the parabola li, having an axis perpendicular to Pi-1,Pi, and passing through the three points: Pi-1,Pi and P Pi+1. Let Qi,1 be the point of intersection of the tangents of Pi-1 and Pi. Taking into consideration Qi, the central point between Qi-i,2 and Qi,1, we assumed that Pi-1>,Qi, and Pi,Qi were the tangents at Pi-1 and Pi, of the approximate curve between points Pi-1 and Pi. Since the tangents of the curve at each point will not strictly coincide before and after the point, the curve will therefore bend in a different direction at each point. However, if the points in the series have been spaced at suitable intervals, the differences in the tangential directions will be so small as to be negligible, and these variations will make no difference from the practical point of view.

Figure 8 - Calculation of tangents by parabolic approximation

Generation of smooth curves

Having obtained the two points P1(x1,y1) and P2(x2,y2), as well as xQ(ζη), the point of intersection of tangents T1 and T2, at P1 and P2, we next draw a curve passing through these points and having the given tangents. This can be conveniently mechanized using the analog elements. Taking into consideration the dynamic characteristics of the XY recorder, we employed the circuit shown in block diagram form in Figure 9. Let us suppose that each input terminal is fed the values: 1 = x1, 1' = x2, 2 = X and 2' = Y (X and Y are certain values), and that the circuit is in steady state. Then the outputs will be x = xi, and y = yi. Let us next change the input at 1 and i' to x2 and y2 respectively, and at the same time let us change the input at 2 and 2' to X + ζ - xi and Y + η - yi, respectively.

Figure 9 - Block diagram for generation of a smooth curve

Then the response of the circuit will be:

x(t)=x2 + [ (x1-x2)(1+t) + (ζ-x2) (t2/2 +t3/6)] e-t

y(t)=y2 + [ (y1-y2)(1+t) + (η-y2) (t2/2 +t3/6)] e-t

Consequently:

x(0) = x1 x(∞) = x2 and at t=0 dy/dx = (η-y1)/(ζ-x1)

y(0) = y1 y(∞) = y2 and at t=∞ dy/dx = (η-y2)/(ζ-x2)

Therefore, the resultant curve l = (x(t) , y(t)) starts from P1(x1,y1), terminates at P2(x2,y2) and has the given tangents at P1 and P2. Curve l has a shape enclosed by the triangle QP1P2, and its shape changes depending upon the directions of tangents T1, and T2, as shown in Figure 10. This method can provide a seemingly natural curve and is quite adequate for the purpose of curve generation required here.

Figure 10 - The curve changes its shape according to the tangents T1 and T2

Interpolation of pictures between the two frames

There are two methods available now to provide a cartoon figure with a sequence of movement.

Type 1

In this method, the original curve is given, as well as the curve after it has been moved and/or modified. Furthermore, the sequence of movement is specified for representative points on the curve. Then the specified number of interpolation curves are prepared for the changes intervening between both curves.

Linear interpolation is adopted as the method of interpolation. That is, interpolation is performed by the fundamental operations of movement, rotation, and expansion and contraction.

Let us assume that the curve in the original drawing No. 1 is given by the series of points S1, S2...Sn, and that the curve in the original drawing No. 2 is given by the series of points e1, e2...en (see Figure 11). Let us suppose that there is a one-to-one relationship between the points in both series, for instance, that point Si will be at point ei after it has completed its movement. Let us also suppose that points Si and Sn are chosen as representative points, and that the sequence of movements of each is given by points P1-Pm and points q1-qm respectively.

Figure 11 - Interpolation of Type I

If we wish to calculate Ai j, the ith point on the jth interpolation curve, we assume Wsi to be the rotation matrix for superposing the vectpr SnSi, on vector qjPj

.

If the expansion rate is ksj:

Asij=ksjWsj(Si-Sn + Si, for i=1,2,...,n and j=1,2,---,m.

Next, let us assume Wej to be the rotation matrix for superposing the vector ene1 on vector qjPj

.

If the expansion rate is kei:

Aeij=KeiWei(ei -en) = qj (i!1,2,...,n) (j! 1,2,...,n)

Finally, let us take the weighted mean of ASij and Aeij to obtain the required point Aij. This will give:

Aij = { (m-j)Asij + jAij}/m

Matrices ksjWsj and kejWej can each be calculated by the following equations:

ksjWsj = 1/[(S1x - Snx)2 + (S1y - Sny)2]
wsj1wsj2
-wsj2wsj1

Here,

Wwj1=(S1x-Snx)(Pjx-Qjx)+(S1y-Sny)(Pjy-Qjy)

Wwj2=(S1y-Sny)(Pjx-Qjx)-(S1x-Snx)(Pjy-Qjy)

And

ksjWej = 1/[(e1x - enx)2 + (e1y - eny)2]
wej1wej2
-wej2wej1

Here,

Wej1=(e1x-enx)(Pjx-Qjx)+(e1y-eny)(Pjy-Qjy)

Wej2=(e1y-eny)(Pjx-Qjx)-(e1x-enx)(Pjy-Qjy)

By means of this transformation, one can obtain the series of points for the group of curves changing continuously, in both their shapes and their positions, from curve S1, S2....Sn, to curve e1, e2....en.

Type II

In this case, one original drawing will suffice. The original curve is moved by a combination of movement, rotation, and expansion and contraction.

This type of transformation is depicted graphically in generalized form in Figure 12. The method of moving the curve is the following. The reference point S'n, is established at an appropriate point, and vector S'n S'1, is drawn from this reference point to a suitable length and in a suitable direction. This is taken as the reference vector. Next, if the curve is a jth transformation curve, two points: Q'j and P'j are given, and one determines the transformation relationship for shifting the reference vector to the vector Q'j,P'j. The original curve is then moved using this relationship.

Figure 12 - lnterpolation of Type II

The following equation is used to calculate Aij, the ith point on the jth interpolation curve:

Aij=Wj(Si-Sn + Q'j, for i=1,2,...,n and j=1,2,---,m.

Here,

Wj = 1/[(S'1x - S'nx)2 + (S'1y - S'ny)2]
wj1wj2
-wj2wj1

Wj1=(S'1x-S'nx)(Pjx-Qjx)+(S'1y-eny)(Pjy-Qjy)

Wj2=(S'1y-S'ny)(Pjx-Qjx)-(S'1x-S'nx)(Pjy-Qjy)

By means of this transformation, both the position and magnitude of the original curve can be transformed while maintaining a similar shape.

In designating the range within which the curves are moved, it does not matter what types of points the representative points are, nor does it matter what types of points are the points in between both of the representative points. For instance, if one wishes simply to move the picture as a whole, it will be enough merely to select the first and last points in the series of points as the representative points. The parts to be moved are not limited to a single place. Any number of places can be specified.

Results of application and their consideration

Animated cartoons were actually prepared on the basis of the methods described above. A typical example is shown in Figure 13. As is evident from the figure, the pictures can be moved about quite freely by this method, and the animated cartoons made in this manner were more or less satisfactory. In the future, when further improvements have been incorporated in the picture input device and the digital program, it is expected that this system will be quite satisfactory from the practical standpoint.

Figure 13 - Examples of animated cartoon

In the system described above, the pictorial patterns are read in as planar patterns, and new patterns are formed by specifying movements on the flat planar surface. However, animated cartoons are fundamentally projections on a plane surface of the movements of spatial objects.

In order to approach this problem, one may formulate, by the trial and error method, an equation corresponding to a clay model such as that shown in Figure 14, and the eyes and mouths can be produced by drawing frontal diagrams. Their x-y coordinates can be read, and assuming them to be present on this curved surface, one can calculate z from the above equation. If the spatial pattern is prepared in this way as an equation, one can draw a diagram of its projection on a flat surface as long as the center, the scale, and the direction of the designated points have been specified.

Figure 14 - Three dimensional display of an equation extracted from a clay model, and features drawn on its surface

This is, however, merely a provisional method which can be used only for limited purposes.

It is found extremely advantageous to use hybrid techniques in order to meet the demand of faster curve displays with lower computer memory requirements. In our experiments, however, still a large amount of computing tasks were done in the digital computer, i.e. calculation of tangents. It was desired to develop an analog curve generator capable of generating a smooth curve given only successive point coordinates.

We have developed such a curve generator, which is now in use.

ACKNOWLEDGMENT

Many thanks are expressed to Researcher Fujii, who took charge of many sections of the actual work in the performance of this research project.