SUB read_data(x(),y(),ndata) ! read file for position of particle at regular intervals OPEN #1: name "xy.dat",access input LET t = 0 DO while more #1 LET t = t + 1 INPUT #1: x(t),y(t) LOOP CLOSE #1 LET ndata = t ! # of data points END SUB