Computer animation of a bicycle simulation

JAMES P. LYNCH and R. DOUGLAS ROLAND, Cornell Aeronautical Laboratory

1972

FJCC

INTRODUCTION

For years, printed output was the only means of communication between the computer and man. This limitation dictated that only the technically skilled could interpret the reams of computer printout with its lists of numbers and specialized codes.

For certain types of computer usage, such as accounting, numbers may be the most meaningful form of output which can be presented to the user. Solutions to other problems, however, may represent functional relationships of intangible variables. In this case plots of output data provide a much faster means of communication between the computer and the human. Them is a class of problems for which neither numerical nor plotted output provide sufficient reality for rapid user comprehension. One such area is the simulation of the dynamics of tangible physical systems such as airplanes, automobiles and bicycles. Fortunately, a means of communication is becoming practical which provides immediate visual interpretation of simulation results; not only for the analyst but for the layman as well. This medium is the computer animated graphics display.

The early development of computer animated graphics displays was spurred by several investigators. Bill Fetter of the Boeing Company created an animated human figure in 1960 and a carrier landing film in 1961.[1] Ed Zajac of Bell Telephone Laboratories produced a computer generated movie of a tumbling communications satellite in 1963.[2] Frank Sinden, also of Bell Laboratories, generated an educational computer animated film about gravitational forces acting on two bodies.[3] Two other investigators deserve mention, Ken Knowlton of Bell Labs for his computer animation language (BEFLIX)[4] and Ivan Sutherland for his interactive computer animation work.[5] Interested readers will find an excellent bibliography on the subject in Donald Weiner's survey paper on computer animation.[6]

In early 1971, Cornell Aeronautical Laboratory, Inc., (CAL), began a research program, sponsored by Schwinn Bicycle Company, devoted to the development of a comprehensive digital computer simulation of a bicycle and rider. This simulation would be used to study the effects of certain design parameters on bicycle stability and control. Phase II of this research effort included the development of a computer graphics display program which generates animated movies of the bicycle and rider maneuvers being simulated. It is this graphics display capability that is described herein.

Computer Graphics activities at the Cornell Aeronautical Laboratory range from everyday use of general purpose plotting facilities by many programmers to highly complex computer-generated radar displays. One of the more fascinating computer graphics applications has been the Single Vehicle Accident Display Program, developed at CAL for the Bureau of Public Roads by C. M. Theiss.[9] This program converts automobile dynamics simulation data into a sequence of computer animated pictures used to generate motion picture film of the event. The demonstrated usefulness of this capability spurred the development of a graphics program for the Schwinn Bicycle Simulation.

BICYCLE GRAPHICS PROGRAM FEATURES

The Schwinn Bicycle Graphics Program provides a complete and flexible perspective graphics package capable of pictorially documenting the results of the bicycle simulation. The salient features of the graphics program are:

  1. The program can plot a perspective picture of a bicycle and rider, positioned and oriented as per the simulation data.
  2. The line drawing of the bicycle and rider can be easily changed to fit simulation or esthetic requirements.
  3. The program can produce single pictures or animated movies.
  4. Background objects, such as roadways, houses, obstacles, etc., can be plotted in the scene.
  5. The frame rate for animated films can be adjusted for slow motion" or normally timed action.
  6. The program is written to simulate a 16 mm movie camera, so that photographing a scene is accomplished by specifying a set of standard camera parameters.
  7. The program's camera can be set to automatically pan, zoom, remain fixed, or operate as on a moving base.
  8. Any of the above characteristics may be changed during a run.

Figure 1 shows a typical frame from a bicycle simulation move.

Figure 1 - Computer graphics rendition of a bicycle and rider

SIMULATION AND GRAPHICS SOFTWARE

Digital computer simulation of bicycle and rider

The computer simulation consists of a comprehensive analytical formulation of the dynamics of a bicycle-rider system stabilized and guided by a closed-loop rider control model. This computer simulation program will be used for bicycle design and development with particular consideration being given to the effects of various design parameters and rider ability on bicycle stability and maneuverability.

The bicycle-rider model is a system of three rigid masses with eight degrees of freedom: six rigid body degrees of freedom, a steer degree of freedom of the front wheel, and a rider lean degree of freedom. Included in the analysis are tire radial stiffness, tire side forces due to slip angle and inclination angle, the gyroscopic effects of the rotating wheels, as well as all inertial coupling terms between the rider, the front wheel and steering fork, and the rear wheel and frame.

Forty-four parameters of input data are required by the simulation program. These data include dimensions, weights, moments of inertia, tire side force coefficient, initial conditions, etc. The development of the simulation program has been supported by the measurement of the above physical characteristics of bicycles, the measurement of the side force characteristics of several types of bicycle tires and full scale experimental tests using an instrumented bicycle.

Solutions are obtained by the application of a modified Runge-Kutta step-by-step procedure to integrate equations of motion. Output is obtained from a separate output processor program which can produce time histories of as many as 36 variables (bicycle translational and angular positions, velocities, accelerations, and tire force components, etc.) in both printed and plotted format.

The simulation program, consisting of seven subroutines, uses approximately 170K bytes of core storage and requires about 4 seconds of CPU time per second of problem time when run on an IBM 370/165 computer. The output processor program uses approximately 200K bytes of core storage and requires about 5 seconds of CPU time per run. The total cost of both the simulation and output processor programs is approximately seven dollars per problem.

The mechanics of making a bicycle graphics movie

In addition to the printed and plotted output generated by the Schwinn Bicycle Simulation Program, a special dynamics tape is created for input to the bicycle graphics program. This dynamics tape contains, for each simulation solution interval, the bicycle's position (X, Y, Z coordinates), angular orientation (Euler angles), front wheel steer angle, and rider lean angle. All other pertinent information, such as the steering head caster angle, rider hunch forward angle, are fed to the graphics program via data cards, along with the stored three-dimensional line drawings of the bicycle and rider, and any desired backgrounds.

The bicycle graphics program searches the tape and finds the simulation time corresponding to the desired frame time. Information is then extracted to draw the desired picture. The program mathematically combines the chassis, front fork and pedals to draw the bicycle, and mathematically combines the torso, left and right upper arms and forearms, and left and right thighs, calves and feet to draw the rider. Everything is so combined to yield a picture of a rider astride a bicycle assuming normal pedaling, leaning and handlebar grip. The correctly positioned three dimensional line drawings are transformed into a two dimensional picture plane, as specified by the program's camera parameters (location, orientation, focal length, etc.).

An interface program converts the final line drawings into a set of commands to the CAL Flying Spot Scanner. The cathode ray tube beam of the Flying Spot Scanner traces out one frame of the movie while a 16 mm. movie camera records the image. Upon completion of the picture, the movie camera automatically advances one frame and the graphics program reads the next data (positions, angles, etc., of bicycle and rider) from the dynamics tape. The completed film will show animated motion, exactly as simulated by the computer, Figure 2.

Figure 2a - Bicycle slalom maneuver
Figure 2b - Bicycle slalom maneuver (continued)

A block diagram of the movie making procedure is shown in Figure 3.

Figure 3 - Steps in making Schwinn bicycle movie

Bicycle motions displayed

For maximum realism and esthetic quality, seven distinct bicycle/rider motions were generated:

  1. Bicycle chassis translation and rotation ( 6 degrees-of-freedom)
  2. Front wheel and handlebar steering
  3. Bicycle crank and pedal rotation
  4. Rider left-right leaning
  5. Rider arm steering
  6. Rider leg pedaling
  7. Rider ankle flexing

Figure 4 shows the various body members and joints included in the rider. The separate parts of the bicycle arc shown in Figure 5.

Figure 4 - Joints used for rider display
Figure 5 - Sections used for bicycle display

Modification of the basic graphics package

The Bureau of Public Roads graphics display program provided an excellent base from which to build the Schwinn Bicycle Graphics Program. A pre-stored line drawing, defined in its own coordinate system, is Euler transformed into fixed space and camera transformed into two dimensional picture space. Edge tests arc performed to delete lines out of the field of view. Plotting any object (a line drawing) involves a call to the OBJECT subroutine

      CALL OBJECT(TITLE, X, Y, Z, PHI, THETA, PSI) 

TITLE refers to a particular stored line drawing, while X, Y, Z and PHI, THETA, PSI refer to the desired fixed space position and Euler angles at which the object is to be plotted. Subroutine OBJECT then does all the necessary transformations to plot the object. Plotting the chassis is straightforward, the chassis position and Euler angles are read directly from the dynamics tape.

Displaying the bicycle and rider

All segments of the bicycle and rider are displayed with the same mathematical approach. Parts are referenced by position and orientation to the chassis axis system, and this information is used to calculate the fixed space Euler angles and position. For example, the matrix equation relating points in the front fork axis system to corresponding points in fixed space is:


|    |                             
| XF |           | XSTEER |   | XXF |        | X |
|    |           |        |   |     |        |   |
|    |           |        |   |     |        |   |  
| YF |=[A] { [B] | YSTEER | + | YXF | }  +   | Y |
|    |           |        |   |     |        |   |
|    |           |        |   |     |        |   |  
| ZF |           | ZSTEER |   | ZXF |        | Z |
|    |           |        |   |     |        |   |  

where:

A is the standard Euler transformation matrix ( chassis to fixed space)

B is the front-fork system to chassis axis transformation matrix

(XSTEER, YSTEER, ZSTEER) are points in the front fork space

(XXF, YYF, ZZF) is the front fork system connection point in the chassis system

(X, Y, Z) is the current fixed space position of the bicycle chassis

(XF, YF, ZF) is the front fork points specified in the fixed space set

The B matrix, of course, is a two rotational transformation, being a function of the caster angle and the steer angle. The Euler angles required by subroutine OBJECT can be determined by equating like terms of the standard Euler transformation with the overall transformation, [AB]= [A]*[B]

For instance:

PHI = TAN-1 AB(3, 2) / AB(3, 3)

PSI = TAN-1 AB(2, 1) / AB(1, 1)

THETA = TAN-1 -AB(3, 1)*SIN (PSI) / AB(2, 1)

This procedure can be easily automated by a general subroutine which accepts the coefficients of the two transformation matrices and outputs the Euler angles.

Displaying the pedaling action

The pedal rotation angle is easily determined by tabulating the distance traveled by the chassis and relating it to the wheel size and gear ratio. The toe angle can be approximated by a cosine function of the pedal rotation angle.

w=gear ratio*distance/wheelsize

Toe angle =-.25*cos(w)

An important simplifying assumption in the display of the leg pedaling motion is that the legs move up and down in a single plane. This makes trigonometric calculation of the joint locations straightforward and the object-to-chassis transformations simple one-rotation matrices. Once this information is determined, proccdures similar to the front-fork manipulations are used. Three objects are required for each leg: the thigh, the calf, and the foot.

Displaying the torso

The torso must hunch forward (so that the arms may reach the handlebars) and lean to the left and right (real-world rider control action). The transformation between the torso axis system and the chassis system is determined by two rotations. This transformation is also used for determination of arm location in the chassis system.

Displaying the arms

Determination of the fixed space Euler angles of the arms is complicated by the fact that the elbow joint lies on a circular locus around the shoulder-to-handlebar line. Since the upper arm and forearm arc assumed equal in length, the perpendicular distance from the elbow to the handle-bar-to-shoulder line is known. A transformation matrix can be developed to convert points in the elbow circle plane to the torso system. A constant angle from the elbow circle plane's Y-axis defines a unique elbow point which can be transformed back into the chassis system. Once the elbow point is known, determination of the Euler angles of the arm is straightforward.

MOVIE PRODUCTION

Both the bicycle simulation program and the bicycle grapbics program are run on CAL's IBM 370/165 computer. The flying spot scanner is interfaced with the central digital computer through an IBM 29O9 asynchronous data channel. The flying spot scanner is a high resolution CRT display system used for plotting and scanning. The interface software provides all the controls required by the display to move the beam, advance the film, etc.

The Schwinn Bicycle Graphics program requires 250K bytes of core, and generally runs from 50cents to 90 cents per frame in computing costs, depending on image complexity. No attempt at hidden line removal was planned for this phase.

FUTURE APPLICATIONS

The Schwinn BicyclP Graphics Program was designed as a research tool to demonstrate the capability of the bicycle simulation. Several computer animated movies have been produced of simulated bicycle maneuvers which compare well with full scale experimental maneuvers. At current production cost levels, only the most interesting runs are documented with the bicycle graphics program. The authors feel, however, that the advent of high speed intelligent computer terminals will allow the economical production of computer graphics. In the future the investigator will be able to view animated summaries of simulation results first, before referring to more detailed printed and plotted output data. The most gratifying result of this bicycle graphics capability is that the technically unskilled can share in the understanding that computer simulation is an emulation of reality, and has visible meaning in the everyday world.

ACKNOWLEDGMENT

The authors wish to express their gratitude to the Schwinn Bicycle Company for permission to present this work and also to Ronald B. Colgrove, CAL chief artist, for his excellent rendering of the bicycle rider used in the movie sequences.

REFERENCES

(1) W A FETTER, Computer graphics in communication McGraw-Hill New York 1965

(2) E ZAJAC, Film animation by computer, New Scientist Vol 29 Feb 10, 1966 pp 346-349

(3) F SINDEN, Synthetic cinematography Perspective Vol 7 No 4 1965 pp 279-289

(4) K KNOWLTON, A computer technique for producing animated movies Joint Computer Conference AFIPS 1964 pp 67-87

(5) I SUTHERLAND, Perspective views that change in real time UAIDE 1969 pp 299-310

(6) D D WEINER, Computer animation - an exciting new tool for educators IEEE Transactions on Education Vol E-14 No 4 Nov 1971

(7) R D ROLAND JR, D E MASSING, A digital computer simulation of bicycle dynamics Cornell Aeronautical Laboratory Inc Technical Report No YA-3063-K-1 June 1971

(8) R D ROLAND JR, J P LYNCH, Bicycle dynamics, tire characteristics and rider modeling Cornell Aeronautical Laboratory Inc Technical Report No YA-3063-K-2 March 1972

(9) C M THEISS, Perspective picture output for automobile dynamics simulation Prepared for Bureau of Public Roads by Cornell Aeronautical Laboratory Inc Technical Report No CPR-11-3988 January 1969

(10) C M THEISS, Computer graphics displays of simulated automobile dynamics Proceedings AFIPS Conference Spring 1969