The Random Walk Revisited

Kate Sullivan, David Duce, Bob Hopgood

1. Introduction

In October 1967, Tony Pritchett was asked to prepare a computer program for the automatic production of a short section of animated film at a cost of £75 and that approval from the Institute of Computer Science should be obtained by 4 December, 1967.

On 14 November 1967, a letter [A1] from David Roseveare, Schools Television Producer at the BBC, outlined the requirement for the random walk film.

At the time, Tony was a student of Benedict Nixon at the University.

Most of the work on the project was completed by March 1968 with demonstration of the completed film. Final form regarding holds in the film were finalised (for when the presenter needed to speak over the film) in March 1968.

Tony Pritchett and the Chilton Atlas Console, 2016

The production run on the London Atlas Computer to generate the output magnetic tape (destined for an SC4020 microfilm recorder) was run on 9 June 1968. The actual film was probably produced on the SC4020 at the Atlas Computer Laboratory at Chilton. It is also possible that the film was produced on the Benson-Lehner 120, a later SC4020-compatible recorder, situated at Culham.

The card deck for the Fortran program and its data still exists as does the output listing from the Atlas computer run on the London Atlas. In consequence, a good re-creation of the original program is possible. Most of the Fortran cards had printing across the top, rather faded at times but with this plus the program listing from the actual run, the Fortran program listing is quite accurate.

The data used by the program primarily consists of the coordinates of the three random walks and the final positions of a further 1000 random walks (100 cards). A large proportion of the data cards had no printing on the top so it was then necessary to read the hole punchings on the card. This can be error prone.

Each data card consisted of 10 X-values followed by 10 Y-values (each using 4 columns) giving 10 positions on the screen area.

Typical Fortran Program Card and Data Card

2. Storyboard

From the discussions with the BBC the storyboard for the short film was assembled:

  1. Demonstrate Random Walk: Start doing a random walk slowly then speed up to complete it with a blob indicating the final position reached by 100 steps
  2. Do a second random walk also marking the end point with another blob
  3. Do a third random walk also marking the end point with another blob
  4. Keep just the 3 end point blobs and zoom out to show the expanded view of where future random walks might end up
  5. Add hundreds of blobs from repeated computation of random walks
  6. Construct a histogram of the number of blobs at various distances from the start point
  7. The result is a histogram which has a maximum around the expected 10 steps from startpoint as the arithmetic mean
  8. THE END

The main problems are:

3. SC4020 Programming

It is worth illustrating the difference between defining an animation using the standard animation process and that using a microfilm recorder. The Storyboard from the BBC required:

The diagram below illustrates the animation for the first two steps. Click on the cyan button:

Start of Random Walk

The holds are quite long as requested by the BBC to give the presenter time to describe the process.

A conventional animation would probably be produced by having cels for the blob, circle and cels for several intermediate states of each line for the two steps to give the impression of the line being drawn and it would be the operator of the animation stand who ensured that the cels were positioned correctly for each frame of the film.

The process on, say, the SC4020 microfilm recorder is different. A 16mm or 35 mm camera in a light proof bay has an accurate white phosphor tube below it on to which can be drawn quite short lines or character symbols. The camera shutter is open and anything drawn on the tube immediately fades away but is captured on the film. The only other control is to advance the film in the camera. So the contents of the magnetic tape that drives the microfilm recorder must contain all the instructions to generate every line or symbol on every frame of the film.

The SC4020 has an addressable space of 1023 in the X and Y directions. As its name implies it can output large volumes of text very quickly on to 35mm film as a fast alternative to a lineprinter and requiring much less storage space. Drawing lines between two points whose X and Y coordinates differ by 0 to 63 positions on the raster is provided.

In the random walk film, a line representing a step is 60 units long and so is below the maximum allowed so that each step only requires a single SC4020 instruction to draw it.

For the first line, assuming the circle is positioned at the origin, the line is from [0,0] to [58,15]. This position was chosen at random by selecting an angle theta randomly between 0 and 360 degrees and calculating the point to draw the line to as [60 × cos(theta), 60 × sin(theta)]. Unfortunately, the result has to be rounded to the nearest position on the SC4020 addressable region which is [58,15]. So the actual length of the line is 59.908!

The next problem is that to make the line appear to be drawn we need to choose a set of intermediate points between the origin and [58,15]. Suppose we choose 8 positions then we need the line to appear to be drawn from:

 0,      0   
 7.250,  1.875 
14.500,  3.750  
21,750,  5.625    
29.000,  7.500    
36.250,  9.375    
43.500, 11.250
50.750, 13.125
58,     15

This can be achieved in two different ways on the intermediate frames:

Two ways of drawing the intermediate lines of the step on each sub-step

One of the problems with the SC4020 was keeping the intensity of long and short vectors the same. So the decision here is between executing more SC4020 instructions with the hope of better matches of intensities over the number of instructions generated. In one case only a single line is drawn per frame and in the other 4 on average. Tony made the decision to keep the length of vectors the same and accept the need for more instructions generated. It was probably the correct decision to make.

How realistic the line drawing looks obviously depends on the time between line segments being added and the length of the lines. Quite long lines are shown in the following diagram. For the three early steps, the segments are added every 8 frames (about 0.33secs per segment) while the following steps are drawn every 3 frames (nearer 0.1sec).

0.1 sec 0.2 sec 0.33 sec

Times between line segments being added.

4. SCFOR Routines

Paul Nelson's SCFOR system was the standard way of accessing both the Culham BL 120 and the Chilton SC4020 microfilm recorders from Harwell, Rutherford Laboratory, Atlas Computer Laboratory, London University and universities in general. The program for the BBC Random Walk is no different being a mixture of subroutines to solve the random walk problems and SCFOR to give the best access to the two microfilm recorders.

The SCFOR routines used by the program were:

IDST
Adds identification to SC4020 or BL120 output
IDEND
Must be called at end of plotting, adds output end frame
ADVFLM
Advances output by one frame
ADVREP
Outputs the current frames worth of output N more times
SAVEA
Identifies start of SAVE sequence
SAVEB
Ends the Save sequence
USEIT
Outputs the saved sequence again
EXPHVY(X,CC,Y)
Plots the CC character, 38 is letter upper case Oh; 44 is asterisk *
VECTOR(X1, Y1, X2, Y2)
Draws full screen vector on the microfilm recorder splitting the line into appropriate sections that generate the short vectors needed to produce the complete line.

There is nothing very remarkable about the routines used apart from the problem of outputting many identical frames of film efficiently and the handling of standard backgrounds behind content that would change frame by frame.

The subroutines SAVEA and SAVEB provide the option of generating the SC4020 instructions for some specific background and using it many times later via the USEIT subroutine.

The problem was recognised in the SC4020/BL120 hardware where the contents of a frame of output could be output on the next frame and following frames. The feature is obviously of value for holds. The ADVREP instruction allowed the SC4020 to advance the film, rewind the magnetic tape to the previous advance film command, and read the tape again to output the same information on the next frame. In theory, up to 64 frame holds could be executed.

One drawback was that the continued rewinding and rereading the same piece of magnetic tape just wore the tape out. So the high numbers of advance repeat were constrained to ensure the magnetic tapes lasted longer ;-)

The random walk program takes a midway position saving the set of instructions that generated a hold frame and repeated it, say, 16 times within the saved instructions. Then re-outputting the code a few times via USEIT so that a long hold consisted of a number of short advance repeats one after the other.

At the Atlas Computer Laboratory, the problem arrived sufficiently often that it was possible to switch between the ADVREP subroutine either using the SC4020 instruction or instead substituting a SAVE/REPEAT in software.

The blob in the sequence where 1000 blobs are displayed needs to be reasonably efficient so that instead of multiple lines being generated to create a blob a set of four over-exposed upper case letter O characters were output.

5. Random Walk Program

5.1 Introduction

From various listings, the decision was made to generate the random walks off-line and then provide the coordinates of these as data to the Random Walk program itself. This data consisted of:

This avoided the need for multiple computations of the random walks as the program was being constructed and also ensured that the output from each run was consistent in the random numbers used.

5.2 Blob

The first phase of animating the first three random walks have been discussed above but the blob itself needs some explanation. The SC4020 is quite efficient in outputting its standard text symbols. The CRT beam is extruded through a stencil that contains the outline of the symbol so a character at any position on the screen can be output efficiently.

The decision was to output a pattern of four characters of an overexposed upper case letter O carefully placed to give the impression of a filled in circle.

A blob

For this reconstruction, a filled in circle will be used as this can be generated more efficiently than the original blob and is less dependent on the font being used.

5.3 Three Random Walks

The first part of the Main program is concerned with the animation of the three random walks in some detail. It generates 1008 frames of output for the first 3 steps of the first random walk. This is primarily because of the long holds to allow the presenter to explain what was happening.

Subroutines used are:

CIRCLE
Defines the 16 lines to be drawn for the large circle indicating the starting origin for all the three walks
READM
Reads the coordinate positions of a random walk. There are three of these.
START
Draws the origin, the blob, and the previous final positions if this is not the first walk
GLIDE
Draws one of the first three steps
HOLD
Repeats frames
WALK
Draws subsequent steps more quickly, redrawing the blob each time at the end of the latest step
SHOT
A debugging aid that outputs on the lineprinter where the program has reached in execution

The rest of each random walk takes a further 400 frames. The only complication is that each frame drawn has to remember to draw any previous blobs denoting walk end points and all the steps already taken as well as the next one.

The three random walks are animated below. The long holds have been reduced in length.

"/> "/>

The three random walks

On the BBC film, there is a short sequence that zooms out on the three blobs but this appears to have been done afterwards, possibly by film editing, as it does not appear in the Fortran program. An insert has been added showing how the 60-length steps of the first three random walks are now 48-length steps in the 1000 step section that follows.

5.4 Blobs Galore

The second part of the film is showing the end points of 1000 random walks that are added 50 at a time. It is quite straightforward. The blobs are no longer four letter Ohs. Instead they consist of two asterisks side by side but look quite similar. The main difference is that each blob only takes half as many instructions as the earlier blobs used on the first three random walks.

End Points of 1000 random walks

The red circle shows the starting point for all 1000 random walks. The diagram above looks very similar to Tony's actual film. There are a few minor differences almost certainly due to misreading some of the holes in the card deck but most look correct.

5.5 Histogram

The final part of the film is to show what is the value of the mean distance away from the starting point. The solution is to calculate the distances from the endpoints to the origin for each walk and divide them into classes according to their length and construct a histogram showing where the mean distance is.

The histogram is drawn as rows of blobs for each class piled on top of each other. The animation starts with the longest distance class and progresses to the class nearest the origin. The animation takes each blob and moves it from its starting point to its position in the relevant stack of blobs. This concludes the film. The subroutine that generates this part of the film is named POUR as its task is to pour the blobs into the relevant histogram stack.

The histogram can accommodate 4 blobs left to right in each of the stacks. Each stack builds up in rows of four blobs. The next row is 12 units above the previous one. So the set of 10 stacks might finish up looking something like this:

                               ****                           
                           **  ****   *                       
                   ***   ****  ****   **                
             **    ****  ****  ****   ****  ****              
             ****  ****  ****  ****   ****  ****              
       ***   ****  ****  ****  ****   ****  ****  **          
**     ****  ****  ****  ****  ****   ****  ****  ****  **    
****   ****  ****  ****  ****  ****   ****  ****  ****  ****  

The histogram's base goes from X=485 to 965 in 10 steps of 48 and the base of the first row is Y=896, the one above Y=884 and so on in steps of 12.

A blob situated to the left and above its final position in the stack first moves to the right 16 units per frame until it is just to the left or equal to its final position. The blob then moves down 80 units per frame until it arrives as its position in the stack.

Thus the blobs appear to be pouring down on to their final positions.

The diagram below shows the areas contained by each segment of the histogram.

v-240

Zones used to pour blobs into the histogram

Once poured, the final positions of the blobs in the histogram are shown below.

Blobs in their final positions in the histogram

The algorithm is reasonably obvious from the Fortran Code:

So I generated an XSLT transformation that:

It worked pretty well and it was interesting to see that the zone got smaller so that the next zone was always to the left of the histogram so quite a bit of care had gone into its placement.

6. Conclusions

This might be one of the earliest chemistry computer animations. There were quite a few physics and astronomy ones but not too many related to molecules.

The first three random walks are quite straightforward to animate. The major problem is efficiently generating the repeat frames and long holds on an early microfilm recorder. There was a period at the Atlas Computer Laboratory around the time when this film was being generated when the Advance Repeat instruction did not work correctly. The IBM tape decks in the 1960s were not that reliable in moving backwards or forwards a number of blocks often miscalculating the number of blocks to travel. This was one of the reasons why the 16 main tape decks on the Chilton Atlas were pre-addressed Ampex ones.

Moving the 1000 blobs to positions in the histogram was an innovative piece of animation which could easily be understood by the viewer.

APPENDICES

A1. Letter to Tony Pritchett from BBC: 14 November 1967

Dear Tony,

We spoke. I promised I would send you something about the random walk calculation. The essence of the algebra is as follows:-

Diagram 
(0,0) to (x1,y1) [s1 away] to x2,y2 [s2 away from s1] etc

Sketch the first few strides of a random walk. Choose a set of perpendicular axes, x and y, arbitrarily. Using x- and y- coordinates, resolve stride no 1, into components x1 and y1, stride no.2. into x2 and: y2, and so on. The resultant of that walk, R, is:

 
R2 = (x1 + x2 +... +xn)2 + (y1 + y2 +... +yn)2 = N2

The cross terms, such as 2 x1 x2, add up to zero in averaging over many walks, because those terms are as often negative as positive, and they range similarly from O to 2s2. Similarly for the y cross terms.

Then average value of R is:

R = sqrt(N) s

The assumption is that each s step is the same distance.

The difference between this and what it is expected these particular pupils will be able to understand is that we do not expect them to take an R.M.S. average but simply an arithmetic mean. In this case, the mathematics gives about 0.8sqrt(N) instead of sqrt(N) (0.8 is approximately sqrt(2)/pi).

If you want to go into the mathematics, almost any book on statistics will take you through the work. (It is tied up with the technique for evaluating π by dropping matches at random on a piece of paper covered with parallel lines uniformly placed at a distance comparable with the length of a match. One counts the number of matches which cross lines.)

In this teaching programme we are merely concerned with giving pupils access to enough results for them to get an order-of-magnitude value for such things as molecular velocities, mean free path, etc. For this particular animation we are treating the thing as a kind of statistical experiment, and what we should aim at doing is to be able to superimpose a circle, centre the starting point for each path, and radius 8 steps, assuming 100 steps for each journey. Thanks to the computer, not to mention yourself, we should have enough results for such a circle to look convincing, i.e. a reasonable cluster of finishing points near the circumference of the circle.

In terms of distances on the screen, I suggest that you arrange the parameters so that 16 steps (the diameter of the circle to be superimposed) comes to about three-fifths of the screen height. Since we shall have the full screen height. corresponding to our screen height, I anticipate that something like 90% of the finishing points will lie on the screen. I don't know whether it is practical from your point of view to cater for points which disappear out of sight and reappear again before finishing their journey, but my guess is that we could afford to lose such molecules without affecting the final picture significantly.

I don't want to dwell too much on the precise nature of the distribution because we are only dealing with sets of equal steps, whereas a real molecule will move in a series of unequal steps, and I would hate to think how much programming time that would consume!

Yours

David Roseveare

Producer, Schools Television

A2. Random Walk Fortran Program

JOB LRF91FB1, WEB NIXON, ANIMATION FINAL TO TAPE
INPUT 1 LRF91FB1,INTEGER COORDS
OUTPUT
0 LINEPRINTER 1000 LINES
13 ANY 100 LINES
TAPE 2 BL L0454*INHIBIT
TAPE IBM
14 LP001*PERMIT
STORE 50/96
COMPUTING 2 MINUTES
COMPILER FORTRAN
*RUN
*LIBRARY TAPE 2 BLOCK 1
*FORTRAN SOURCE
C
      BEGIN
      UNLOAD 2
      ICX=480
      CALL POST
      ICY=512
      NO=0
C
      CALL ADVREP(1)
C
      INTEGER NSAVE
      DIMENSION LX(1000),LY(1000),LXT(10),LYT(10)
      DIMENSION LXZ(10,200),LYZ(10,200),NPZ(10)
      DIMENSION MX(100),MY(100),MMX(16),MMY(16)
      EXTERNAL FI
C
C SEQUENCE A
C
      NSDS=16
      CALL CIRCLE(40)
      CALL READL(1)
      NBL=0
      CALL READM
      DG=.125
      NREP=8
      NFS,NFC=0
      K5=8
      K10=16
      K15=23
C
C(1-8)
      J=0
      CALL START(K10,K5)
      CALL GLIDE
      CALL HOLD(K10)
      CALL GLIDE
      CALL HOLD(K5)
      CALL GLIDE
      CALL HOLD(K5)
C(9,10)
      DO 9 J=J+1,99
      CALL WALK
 9    CALL ADVREP(3)
      CALL SHOT(5)
      CALL HOLD(K10)
C(11-19)
      DO TWICE,KK=1,2
      NBL=NBL+1
      CALL READM
      CALL START(K10,K5)
      DO RUN, J=1,99
      CALL WALK
RUN   CALL ADVREP(3)
      CALL SHOT(6)
TWICE CALL HOLD(K10)
      NBL=3
      CALL START(K10,0)
C
      DO BLANK,KK=1,3
BLANK CALL ADVREP(16)
C
C
      NSDS=12
      CALL CIRCLE(16)
      CALL READL(100)
      NFS,NFC=0
C
C SEQUENCE B
          OUTPUT(13)//
C(29)
      CALL SAVEA
      CALL ORIGIN
      DO 28 J=1,3
      CALL EXPHVY(LX(J)-1,44,LY(J))
  28  CALL EXPHVY(LX(J)+1,44,LY(J))
      CALL ADVREP(16)
      CALL SAVEB
      DO 29 J=1,K10-1
  29  CALL USEIT
      CALL SHOT(1)
C
C(30)
      CALL SAVEA
      CALL ORIGIN
      CALL SAVEB
C
      DO 1000 KK=0,750,250
C
      DO 200 NBL=50,200,50
      CALL USEIT
C
      DO ONE, J=KK+1,KK+NBL
ONE   IF(LX(J).GE.0) CALL EXPHVY(LX(J),44,LY(J))
C
200   CALL ADVREP(12)
C
      CALL SAVEA
      CALL ORIGIN
      DO EACH, J=1,KK+250
EACH  IF(LX(J).GE.0) CALL EXPHVY(LX(J),44,LY(J))
      CALL SAVEB
C
1000  CALL ADVREP(12)
      CALL SHOT(2)
C(31/32)
      DO HLD, J=1,K15
      CALL USEIT
HLD   CALL ADVREP(16)
      CALL SHOT(3)
C
C SEQUENCE C
C
      IBASE=896
      ICWID=40
      KDX=7
      KDY=12
C
C ZONIZE
      CLEAR NPZ
      DO ZONES, M=1,1000
      NZ= SQRT(LX(M)-480)**2 + LY(M)-512)**2)/48 + 1
      IF(NZ.GT.10) GO TO ZONES
      L,NPZ(NZ)=NPZ(NZ)+1
      LXZ(NZ,L)=LX(M)
      LYZ(NZ,L)=LY(M)
ZONES CONTINUE
C
C(33,34)
      NZ=10
      NF=K10-1
      CALL STILL
      CALL STOPIT
      CALL DOTS
      CALL ADVREP(16)
      CALL SHOT(4)
      CALL POUR
      CALL SHOT(5)
C(35,40)
      DO 40 L=2,3
      NF=16/L
C
      CALL STILL
      
      CALL SHOT(6)
      NZ=NZ-1
      CALL STILL
C
      CALL STOPIT
      CALL DOTS
      CALL ADVREP(2)
      CALL SHOT(7)
      CALL POUR
      CALL SHOT(8)
 40   CONTINUE
C(41-45)
      DO 45 NZ=7,1,-1
             OUTPUT(0,3)/'NZ=',NZ
      CALL STOPIT
      CALL ADVREP(16)
      CALL SHOT(9)
      CALL USEIT
      CALL DOTS
      CALL ADVREP(16)
      CALL SHOT(10)
      CALL POUR
      CALL SHOT(11)
 45   CONTINUE
C(46)
      NZ=1
      NF=16
      CALL STILL
      CALL SHOT(12)
      CALL IDEND
      STOP
C
      SUBROUTINE READM
      READ(1,2) IDENT
      PRINT 3, IDENT
      READ(1,1) ((MX(J*10+I),I=1,10),(MY(J*10+I),I=1,10),J=0,9)
      RETURN
      END
      SUBROUTINE GLIDE
      DO GLIDE,G=DG,1.001,DG
      LPX=ICX
      LPY-ICY
      CALL ORIGIN
C
      IF(J.LT.1) GO TO STEPS
      DO STEPS, K=1,J
      CALL VECTOR(LPX,LPY,MX(K),MY(K))
      LPX=MX(K)
      LPY=MY(K)
STEPS CONTINUE
C
      NPX=LPX+G*(MX(J+1)-LPX)
      NPY=LPY+G*(MY(J+1)-LPY)
      CALL VECTOR(LPX,LPY,NPX,NPY)
      CALL BLOB(NPX,NPY)
C
GLIDE CALL ADVREP(NREP)
C
      J=J+1
      CALL SHOT(3)
      RETURN
      END
      SUBROUTINE WALK
      CALL ORIGIN
C
      IF(NBL.LT.1) GO TO BLOBS
      DO BLOBS, K=1,NBL
      CALL BLOB(LX(K),LY(K))
BLOBS CONTINUE
C
      CALL VECTOR(ICX,ICY,MX(1),MY(1))
C
      IF(J.LT.2) GO TO LINES
      DO LINES, K=2,J
      CALL VECTOR(MX(K-1),MY(K-1),MX(K),MY(K))
LINES CONTINUE
C
      CALL BLOB(MX(J),MY(J))
      RETURN
      END
      SUBROUTINE START(NA,NB)
      CALL SAVEA
      CALL ORIGIN
      IF(NBL.LT.1) GO TO 1
      DO 1 I=1,NBL
      CALL BLOB(LX(I),LY(I))
   1  CONTINUE
      CALL ADVREP(16)
      CALL SAVEB
C
      DO 2 I=1,NA-1
   2  CALL USEIT
      CALL SHOT(1)
      IF(NB.LT.1) RETURN
C
      CALL SAVEA
      CALL ORIGIN
      IF(NBL.LT.1) GO TO 4
      DO 3 I=1,NBL
   3  CALL BLOB(LX(I),LY(I))
   4  CALL BLOB(ICX,ICY)
      CALL ADVREP(16)
      CALL SAVEB
C
      DO 5 I-1,NB-1
   5  CALL USEIT
      CALL SHOT(2)
C
      RETURN
      END
      
      SUBROUTINE HOLD(NHS)
      CALL SAVEA
      CALL WALK
      CALL ADVREP(16)
      CALL SAVEB
      DO 1 I=1,NHS-1
  1   CALL USEIT
      CALL SHOT(4)
      RETURN
C
      END
      DIMENSION IBX(4)/ 0, 0,-4,+4/
      DIMENSION IBY(4)/-2, 0,-1,-1/
      SUBROUTINE BLOB(IX,IY)
      DO 1 K-1,4
   1  CALL EXPHVY(IX+IBX(K),38,IY+IBY(K))
      RETURN
      END
      SUBROUTINE CIRCLE(RADIUS)
      DTHETA=2*PI/NSDS
      DO ROUND,NV=1,NSDS
      THETA=DTHETA*NV
      MMX(NV)=ICX+RADIUS*COS(THETA)
ROUND MMY(NV)=ICY+RADIUS*SIN(THETA)
      RETURN
      END
C
      SUBROURINE READL(N)
      READ(1,2) IDENT
      PRINT 3, IDENT
      READ(1,1) ((LX(J*10+I),I=1,10),LY(J*10+I)I=1,10),J=0,N-1)
      RETURN
      END
    1 FORMAT(20I4)
    2 FORMAT (A8)
    3 FORMAT(1X,A8)
C
      SUBROUTINE ORIGIN
      CALL VECTOR(MMX(NSDS),MMY(NSDS),MMX(1),MMY(1))
      DO 1 I=1,NSDS-1
   1  CALL VECTOR(MMX(I),MMY(I),MMX(I+1),MMY(I+1))
      RETURN
      END
      
C   End of Part 2 in listing
      END
      SUBROUTINE STILL
      CALL SAVEA
      CALL ORIGIN
      DO 1 I=NZ,10
      DO 1 J=1,NPZ(I)
   1  CALL EXPHVY(LXZ(I,J),44,LYZ(I,J)
      CALL ADVREP(16)
      CALL SAVEB
      DO 2 I=1,NF-1
   2  CALL USEIT
      RETURN
      END
      SUBROUTINE STOPIT
      OUTPUT/'STOPIT)'/
      CALL SAVEA
      CALL ORIGIN
      IF(NZ.GE.10) GO TO 2
      DO 1 I=NZ+1,10
      DO 1 J=1,NPZ(I)
   1  CALL EXPHVY(LXZ(I,J),44,LYZ(I,J))
   2  CALL SAVEB
      RETURN
      END
      SUBROUTINE DOTS
      OUTPUT/'DOTS)'/
      DO 1 I=1,NPZ(NZ)
   1  CALL EXPHVY(LXZ(NZ,I),44,LYZ(NZ,I))
      RETURN
      END
      SUBROUTINE POUR
      OUTPUT('POUR)'/
      ICST=(NZ-1)*48+485
      NARR=0
      KY=IBASE
C
   1  CALL USEIT
C
      DO 3 I=1,NPZ(NZ)
      IF(LXZ(NZ,I).LT.0) GO TO 3
      IF(LXZ(NZ,I).LT.ICST) BEGIN
         LXZ(NZ,I)=LXZ(NZ,I)+16
         GO TO 2
         END
      IF(LYZ(NZ,I).LT.KY-80) BEGIN
         LYZ(NZ,I)=LYZ(NZ,I)+80
         GO TO 2
         END
C
      NARR=NARR+1
      LXZ(NZ,I)=-1
      GO TO 3
C
   2  CALL EXPHVY(LXZ(NZ,I),44,LYZ(NZ,I))
   3  CONTINUE
C
      IF(NARR.LE.0) GO TO 4
      KX=0
      KY=IBASE
      DO 4 I=1,NARR
      CALL EXPHVY(ICST+KX,44,KY)
      KX=KX+KDX
      IF(KX.LE.ICWID) GO TO 4
      KY=KY-KDY
      KX=0
   4  CONTINUE
C
      CALL ADVREP(2)
      IF(NARR.LT.NPZ(NZ)) GO TO 1
C
      KX=0
      KY=IBASE
      DO 5 I-1,NARR
      LXZ(NZ,I)=ICST+KX
      LYZ(NZ,I)=KY
      KX=KX+KDX
      IF(KX.LE.ICWID) GO TO 5
      KY=KY-KDY
      KX=0
   5  CONTINUE
C
      RETURN
      END
      SUBROUTINE SHOT(NO)
      OUTPUT/NO
      RETURN
      END
      END

This program is printed out as part of the program execution so we have a confirmation that the set of data cards and the program actually run are identical.

A3. Random Walk Data

Some of the cards were out of order. Hopefully most of these have been corrected. Only some of the cards have print outs of the content across the top so the cards below require, in many cases, to examine the whole configurations on the card to ascertain the contents.

3 BLOBS
15 406 713
 A500000
 538 518 461 418 471 531 550 571 630 571 497 440 424 381 352 351 408 484 471 481
 531 684 708 652 598 565 509 569 629 574 479 451 506 529 508 456 478 471 465 489
 534 526 474 508 520 466 422 378 437 381 444 384 354 403 462 435 395 436 425 447
 435 487 492 551 502 457 434 380 376 356 473 503 443 456 491 530 586 581 621 677
 407 350 339 279 297 237 254 308 360 363 646 626 685 683 760 734 677 702 672 612
 318 329 284 329 329 382 324 303 326 273 573 632 592 632 572 601 618 562 617 645
 327 283 238 183 140 163 181 125 183 167 618 577 537 561 519 464 521 543 528 470
 144 116 173 233 218 278 334 275 302 298 525 472 454 459 517 522 500 509 563 503
 255 207 147 131  72  16  74 134 130 106 545 509 512 570 561 582 569 574 634 690
  95 139 154  96 135 118  70  58   3  15 748 708 650 632 586 644 679 738 716 657
  A100000
 538 518 451 418 471 515 559 502 497 438 497 440 424 381 352 392 351 332 392 402
 490 550 519 465 465 406 382 425 386 434 373 381 330 355 415 430 485 443 488 452
 414 383 334 312 290 256 309 293 239 297 395 344 377 321 377 427 398 456 483 468
 251 311 347 342 397 367 338 382 324 265 429 427 379 320 344 292 239 199 183 171
 325 301 278 326 299 247 228 278 309 321 165 221 165 129  75 105 162 128 179 120
 371 357 401 460 409 452 449 445 504 449 153 311 251 241 272 314 374 433 441 416
 502 459 485 441 389 377 335 377 431 476 444 496 432 391 361 420 377 334 360 320
 523 521 557 582 523 534 593 621 569 549 282 342 294 240 246 187 198 251 281 337
 562 562 514 503 482 454 406 347 353 308 396 456 430 480 536 589 552 562 621 661
 261 270 247 289 341 386 433 376 359 406 699 639 584 542 573 533 496 514 456 496
 A139988
 441 440 492 545 499 547 567 508 566 543 557 497 468 497 459 494 437 425 407 463
 491 550 562 514 471 462 402 367 425 470 434 445 504 539 582 523 519 568 555 596
 528 569 504 519 459 514 466 499 440 401 581 553 521 463 467 491 527 577 568 614
 420 424 435 488 443 399 459 450 490 550 556 616 557 587 546 587 587 647 691 699
 529 472 485 430 480 445 496 436 494 459 643 661 602 625 592 641 609 609 593 544
 599 348 369 374 428 369 361 305 304 322 546 577 633 573 546 558 490 476 416 359
 336 378 330 372 318 258 317 258 260 202 417 460 496 539 513 512 501 496 436 452
 261 307 247 261 320 370 428 445 425 366 440 479 482 540 549 525 526 584 528 539
 414 448 475 467 435 438 493 468 431 490 504 454 508 448 397 457 482 427 380 373
 533 561 542 579 639 601 660 618 677 713 414 468 411 354 359 313 303 261 253 204
  B600000
 294 451 573 264  54 538 696 702 399 388 570 505 389 481 555 563 371 510 704 284
 560 608 475 445 836 732 432 548 573 481 686 474 521 615 328 668 647 290 413 804
 511 505 439 361 355 298 753 665 682 578 355 427 552 486 434 572 492 426 379 424
 416 448 626 381 242 738 173 701 461 470 773 657 507 737 459 400 609 491 714 557
 446 555 684 774 505 660 417 622 425 572 667 499 459 570 823 257 274 796 660 182
 432 248 435 670 390 577 417 119 677 552 612  11 505 637 456 330 493 329 417 228
 699 271 270 429 357 246 429 357 362 527 379 603 161 547 664 620 449 447 513 882
 732 372 314 706 421 466 137 467 256 276 376 679 782 363  99 344 617 148 786 577
 414 422 358 228 569 685 368 350 668 342 357 597 235 408 378 562 348 309 371 761
 439 709 571 715 205 325 539 415 443 370 412 507 350 616 601 471 714 771 476 508
 516 371 475 350 516 793 544 331 277 504 525 500 357 332 529 721 438 546 496 560
 619 567 330 431 557 282 423 425 269 817 508 594 461 428 253 424 631 445 470 531
   1 621 404 536 487 453 541 280 334 544 338 459 811 668 448 332 522 447 186 447
 476 406 106 322 581 578 132 390 914 622 225 625 526 422 437 337 425 368 459 484
 705 527 478 565 552 348 507 803 319 732 809 438 460 418 760 610 510 653 297 212
 338 520  ?1 646 447 195 516 480 413 335 472 585 492 474 576 318 432 279 672 569
 500 705 277 601 616 250 524 435 449 218 374 398 658 460 466 665 479 556 350 319
 675 250 594 614 522 916 390 488 402 349 569 474 405 638 474 578 629 690 121 628
 771 325 409 226 542 200 380 396 665 549 494 313 653 804 620 539 356 712 514 722
 645 707 198 475 424 624 370 448 612 178 421 169 595 548 489 419 723 569 667 418
 336 593 655 436 557 381 474 498   1 212 653 448 515  81 635 279 654 461  65 633
 225 307 647 250 525 666 549 543 445 898 676 667  64 413 420 778 740 607 632 332
 830 451 346 560 447 445 330 732 356 492 422 778 352 591 152 513 647 429 484 202
 757 290 567 258 514 240 365 463 376 686 479 539 208 389 328 510 470 680 797 630
 418 434 742 450 294 486 338 318 396 563 574 715 584 475 423 172 312 553 541 459
 392 321 459 265 463 405 285 767 396 713 465 267 307 497 518 956 412 538 555 514
 489 185 593 570 485 519 244 581 319 541 271 538 732 695 686 212 823 297 580 557
 552 314 499 821 616 536 483 391 439 342 721 536 325 745 100 422 228 609 576 409
 587 822 437 697 446 298 757 340 742 555 457 788 769 458 421 544 358 518 521 197
 242 720 407 692 348 384 371 425 142 453 214 554 539 373 627 628 354 636 546 481
 290 467 689 436 603 629 438 784 500 521 575 558 328 588 437 510 353 517 760 695
 296 531 419 400 477 474 534 442 478 471 406 409 351 396 897 604 409 584 657 364
 468 502 681 577 455 485 374 509 710 526 424 648 680 344 580 489 548 558 637 470
 597 254 348 267 564 457  81 218 577 513 494 417 272 563 215 436 322 592 526 597
 299 773 359 439 683 100 620 940 436 460 586 279 502 841 767 676 569 338 341 323
 306 647 435 424 361 371 221 341 269 720 554 817 604 594 637 119 573 697 231 614
 258 639 627 387 600 636 674 677 348 621 436 253 594 498 535 434 554 616 513 311
 553 668 332 294 381 325 464 466 761 723 128 918 549 293 423 414 564 456 618 566
 538 384 487 453 471 764 471 871 592 351 530 817 521 470 490 557 659 836 567 357
 311 330 359 446 360 334 521 826 609 526 659 463 406 414 313 820 802 640 664 603
 489 794 338 700 462 380 345 671 392 445 636 520 713 714 723 497 370 656 307 297
 443 518 683 485 654 283 586 403 773 182 464 470 623 498 376 693 497 569 207 457
 464 359 499 503 466 496 778 465 421 450 314 492 533 929 530 676 481 532 529 528
   1 674 258 805 430 273 368 242 401 516 1036 626 388 508 661 397 542 424 775 583 
 422 883 248 687 342 555 299 650 366 634 379 593 660 728 637 678 537 617 658 835
 633 255 531 111 369 340 779 341 670 695 299 464 660 613 639 411 462 619 615 403
 463 255 578 690 368 488 632 334 667 794 576 636 267 520 530 646 525 733 421 563
 451 503 208 324 660 510 445 539 204 824 242 473 531 489 563 423 761 507 423 555
 564 830 611 465 517 384 423 598 289 396 814 633 216 349 638 282 384 564 568 465
 278 359 595 412 164 685 537 672 595 596 505 148 504 577 594 558 344 535 210 255
 291 514 513 496 331 499 468 576 361 499 310 229 904 646 705 464 439 126 757 458
 264 617   1 329 472 283 363 285 319 530 517 711 1052 704 771 638 357 306 581 444
 432 289 293 656 375 770 368 576 561 377 510 259 377 534 499 228 541 607 493 523
 441 365 356 354 517 354 590 591 599 274 409 427 637 436 656 500 516 299 713 521
 271 164 352 494 307 697 246   1 574 525 609 222 473 328 326 714 231 1089 586 600  
 718 278 647 452 645 278 772 528 391 394 719 793 473 444 504 839 656 602 636 187
 234 117 569 470 264 479 606 610 447 424 621 687 870 416 891 394 629 819 302 430 
 516 612 700 512 254 198 507 656 354 364 259 411 511 799 398 569 505 583 596 697
 372  96 545 306 534 843 482 300 491 358 316 540 602 343 476 387 277 670 500 680
 699 568 390 651 452 334 297 413 293 171 281 745 791 579 362 554 535 511 625 804
 833 555 179 275 455 276 689 623 475 378 246 579 475 333 372 331 202 661 510 532
 366 433 505 335 271 341 700 197 407 381 390 812 332 581 293 632 724 517 398 260
 653 411 437 544 477 512 443 150 408 385 710 548 538 799 454 550 779 445 462 598
 349 416 553 416 227 571 451 371 474 674 587 460 493 366 487 387 632 637 597 307
 532 809 533 398 669 479 458 684 284 337 576 365 595 672 591 588 370 626 647 562
 565 485 371 629 488 526 370 589 764 520 472 580 695 380 689 182 853  84 380 570
 301 340 756 682 691 193 308 469 646 201 465 574 432 535 820 517 439 310 814 783
 599 375 514 583 577 296 384 349 474 402 691 451 340 398 608 312 525 486 530 667
 369 286 280 655 372 458 538 417 877 502 428 786 408 772 291 369 143 513 581 600
 452 652 486 506 533 480 304 252 651 485 544 652 403 176 580 166 463 598 763 429
 652 210 617 430 386 376 684 583 719 541 602 452 403 554 732 462 489 534 145 567
 407 474 401 470 409 581 122 664 293 355 399 600 246 522 242 779 199 580 444 487
 397 888 711 583 454 216 377 502 304 342 563 636 343 290 147 565 606 617 611 654
 433 251 427 655 434 695 263 415 556 765 626 250 237 298 682 382 428 678 510 443
 791 399 583 388 501 323 390 418 179 669 220 727 695 507 322 206 560 537 804 737
 214 403 469 299 707 475 348 416 325 492 329 667 625 439 603 549 859 357 510 581
 569 566 472 435 226 630 504 276 283 641 472 420 685 494 383 441 450 547 383 381
 553 358 348 682 643 244 405 654 782 593 477 656 499 628 544 492 329 756 404 486
 249 546 625 354 188 536 632 443 530 524 594 624 508 657 389 547 381 659 500 384
 370 287 596 684 558 751 675 365 906 307 370 662 574 348 542 464 369 458 372 783
 492 702 730 757 447 256 530 525 736 382 503 449 504 598  82 689 380 342 111 690
 495 241 328 556 117 121 267 627 352 438 313 618 356 719 593 634 754 683 738 598
 715 296 677 437 684 547 175 801 495 466 761 344 715 130 597 398 762 512 730 541
 319 826 336 396 629 593 276 733 487 448 522 540 653 533 786 697 186 788 549 332
 252 633 789 432 342 500 782 386 369 250 296 434 649 559 318 203 288 547 647 657
 602 344 565 633 317 618 488 461 807 638 647 434 269 750 466 642 532 319 831 408
 501 216 378 581 122 469 416 499 404 421 366 374 840 478 611 691 514 838 665 237
 258 504 579 307 670 380 943 185 384 775 660 416 157 589 415  80 414 491 284 417
 347 686 302 491 214 438 498 435 734 765 525 441 722 477 417 391 657 651 459 300
 593 458 153 348 448 450 620 360 545 435 377 672 424 638 413 522 342 640 402 492
 421 522 600 545 659 621 363 155 541 518 557 249 468 768 339 779 705 431 509 412 
 709 728 301 613 387 335 602 813 232 714 711 500 349 470 389 392 628 612 547 653
 164 465 740 597 801 334 401 387 334 421 723 442 498 502 598 454 486 398 659 607
 540 631 391 302 651 460 444 589 641 924 351 399 762 398 497 255 550 320 723 647
 359 434 687 457 917 158 268 651 629 529 613 745 549 644 290 245 533 524 286 404
 554 475 157 287 241 354 445 354 768 563 343 550 641 824 358 436 651 580 408 903
 497 128 477 753 527 515 476 369 580 584 463 290 570 525 563 671 239 410 318 545
 353 219 343 489 427 567 424 502 508 881 609 791 564 678 500 328 722 164 327 591
 491 152 479 684 638 257 622 577 468 447 879 227 384 134 121 529 924 693 664 290
 456 447 209 782 723 297 719 550 535 415 597 735 562 765 397 727 547 538 534 376

A4. Open University Spring Term: Mean Free Path

The Random Walk film was to be part of the Open University Spring Term Programme concerning Molecular Velocity, Mean Free Path and Molecular Diameter.

The overview for the Mean Free Path section was:

Before viewing, pupils should have seen the bromine diffusion experiment as a class demonstration, and should have embarked on some discussion of the main implication, i.e. that although the mean molecular speed is comparable to the speed of sound, the molecules must evidently be crowded for the diffusion in air to be so slow. It might be useful for the class to have performed the dice-throwing experiment as suggested in N.G.IV p,235.

The programme would start by going through the theory relating to the previous programme (or alternatively state the equation PV = ⅓Nmv2). If possible the Zartmann experiment would be shown on film, and pupils would be able to compare their own estimates with Zartmann's result.

The programme might then include a difficult variation of the standard bromine experiment, e.g., diffusing bromine into carbon dioxide rather than into air. Animated film now shows molecules colliding, and an individual molecule is singled out so that we can observe its random movement. The drunkard's walk is illustrated, and a computer-made film is shown in which the molecule is represented by a blob, leaving a record of its path behind it as it moves randomly with a fixed length of path between successive collisions. This is done for, say, a hundred successive steps. We next see (thanks to the computer) the result of several hundred, or perhaps a thousand, sets of a hundred steps, the result being in the form of a scatter diagram showing a concentration about a ring which will be approximately ten steps from the common starting point.

Teachers are now in a position to take the viewers through the remaining arithmetic to arrive at a value for the mean free path.