Program source code:
Program "~BOUNC41"
'BOUNCER4.1
1->Y:0->N
Range 1,127,0,1,63,0,1,127,1
Lbl 6
Cls
2Int (.5+Ran#)-1->D
10+40Ran#\sqr->W
(-)60/W\sqr->G
64-D(63-WRan#->N
.5+.3Ran#->E
Lbl 0
D=1=>N+W>=Xmax=>Goto 1
D<>1=>N+W>=Xmax=>Goto 2
D=1=>N-W<=Xmin=>Goto 3
D<>1=>N-W<=Xmin=>Goto 4
D=1=>Graph (X,Y)=(T,1+G(T-N)\sqr-GW\sqr),[N-W,N+W]
D<>1=>Graph (X,Y)=(2N-T,1+G(T-N)\sqr-GW\sqr),[N-W,N+W]
Lbl 5
WE->W
(-)GW\sqr<1=>Goto 6
N+DW(1+E\-1->N
Goto 0
Lbl 1
Graph (X,Y)=(T,1+G(T-N)\sqr-GW\sqr),[N-W,Xmax]
2Xmax-N->N
(-)1->D
Goto 0
Lbl 2
Graph (X,Y)=(Xmax+N-W-T,1+G(Xmax-W-T)\sqr-GW\sqr),[N-W,Xmax]
Goto 5
Lbl 3
Graph (X,Y)=(T,1+G(T-N)\sqr-GW\sqr),[Xmin,N+W]
Goto 5
Lbl 4
Graph (X,Y)=(Xmin+N+W-T,1+G(Xmin+W-T)\sqr-GW\sqr),[Xmin,N+W]
2Xmin-N->N
1->D
Goto 0
|