set display mode 1024,768,32
sync on
sync rate 60
ink rgb(0,255,0),0
 
dim x(9,7)
dim y(9,7)
dim currentx1(8,7)
dim currenty1(8,7)
dim currentx2(8,7)
dim currenty2(8,7)
 
for digit=0 to 9
  read string$
  for coordinate=1 to 7
    x(digit,coordinate)=val(mid$(string$,(2*coordinate)-1))
    y(digit,coordinate)=val(mid$(string$,2*coordinate))
  next coordinate
next digit
 
x=250
y=100
stepvalue=5
 
 
do
 
time$=get time$()
 
cls
for numeral=1 to 8
  if numeral<>3 and numeral<>6
  digit=val(mid$(time$,numeral))
  for coordinate=1 to 6
    targetx1=x+(numeral*50)+5*x(digit,coordinate)
    targety1=y+5*y(digit,coordinate)
    targetx2=x+(numeral*50)+5*x(digit,coordinate+1)
    targety2=y+5*y(digit,coordinate+1)
    currentx1(numeral,coordinate)=smoothvalue(targetx1,currentx1(numeral,coordinate),stepvalue)
    currenty1(numeral,coordinate)=smoothvalue(targety1,currenty1(numeral,coordinate),stepvalue)
    currentx2(numeral,coordinate)=smoothvalue(targetx2,currentx2(numeral,coordinate),stepvalue)
    currenty2(numeral,coordinate)=smoothvalue(targety2,currenty2(numeral,coordinate),stepvalue)
    line currentx1(numeral,coordinate),currenty1(numeral,coordinate),currentx2(numeral,coordinate),currenty2(numeral,coordinate)
  next coordinate
  endif
next numeral
 
sync
loop
 
data "11315155351511"
data "31414243453555"
data "11515313153555"
data "11414313535515"
data "11133353515455"
data "51111353553515"
data "51111215555313"
data "11515333434445"
data "11515515111353"
data "53131151553515"
 
function smoothvalue(target,current,speed)
    stp = target-current
    if stp
        stp = (stp/abs(stp)) + stp/speed
        inc current,stp
    endif
endfunction current