Inbetweening by home computer

The general principles of inbetweening are given in a programme that can be adapted for most home micro computers. David Jefferson explains how it works.

This programme will make inbetween drawings for two given drawings. It will do as many inbetween steps as you ask it. The way it works is to look at both drawings one point at a time and work out the difference in their positions on the monitor screen. This difference is then divided by the number of inbetween drawings that you ask for. When it has done this for each point on the drawing it uses the information to make a new drawing.

Top: Section of graph paper. Bottom: Drawings 1 and 3 were fed into the computer, drawing 2 is the computers’ inbetween. Drawings traced from the monitor screen.

The drawing information is stored in a list of x,y screen co-ordinates. There are the same total of coordinates for each drawing and they are listed in the same order. The drawing is made by making a straight line between one point and the next like the join the dots games in a children’s book.

The programme was written in Microsoft Basic on a Sanyo 555 computer. This is a similar Basic to that used on the BBC, Spectrum etc. The main difference will be in the way the programme addresses the screen. The Sanyo 555 draws a line with the instruction LINE (A1,B1) – (A2,B2) where AI,BI is the start of the line and A2,B2 is the end. The same thing is done on the BBC with MOVE A1,BI : DRAWA2,B2. The Sanyo 555 has a screen display of 640 points across and 200 down. If yours is different you can arrive at a suitable scale by dividing the numbers by two, or multiplying them by two as required.

I worked the drawings out by doing the drawings on graph paper to start with. Once you have seen how the programme works you could write yourself an extension too it to take data from a moving cursor on the screen, controlled by keys, a joystick or a drawing tablet.

If you get any interesting results from this programme or make useful adaptations we would be pleased to see them. Good computing and good animating.


10 REM ******** INBETWEENING ********
20 DIM A8(16) ,BB(16) ,AE(16),BE(16),A(16),B(16)
30 FOR X=1 TO 16
40 READ AB(X),BB(X)
50 NEXT X
60 FOR X=1. TO 16
70 READ AE(X),BE(X)
80 NEXT X
90 INPUT “HOW MANY INBETWEEN DRAWINGS” ; DRAW
100 FOR X=0 TO DRAW+1
110 FOR Y=1 TO 16
120 A(Y)=(AB(Y)*(DRAW+1-X)+AE(y) *x)/(DRAW+l)
130 8(Y)=(Bn(Y) *(DRAW+1-X)+BE( Y)*X)/(DRAW+l)
140 NEXT Y
150 CLS
160 FOR Z=2 TO 16
170 LINE(A(z – 1) ,B(z – 1) ) – (A(z) ,B(Z) )
180 NEXT Z
190 NEXT X
200 REM DATA FOR FIRST DRAWING – DIVER
210 DATA 112,198,86,194,150,178,108,164
220 DATA 142, 152,212, 172, 144,138,162,132
230 DATA 152,122,130,126,136,138,120,140
240 DATA 84,170,120,178,64, 198,112,198
250 REM DATA FOR SECOND DRAWING
260 DATA 104,188,124,172, 160,156,180,128
270 DATA 232,116,312,104,232,106,250,98
280 DATA 242,88,224,92,222,100,202,102
290 DATA 152,124,144,150,111,172,104,188


Printed in Animator Issue 14 (Winter 1985)