Pattern

PATTERN title on a TV screen with criss-crossing striped bands
PATTERN title on a TV screen with criss-crossing striped bands

PATTERN is a program that draws lines bouncing off the sides of the television screen. It draws for a limited time, then starts erasing them. It has a hard time erasing some marks on the sides of the screen. Submitted by Donald Hanson of Adams, New York. (T/S1000,1500,ZX81 2K)

Printout of the pattern drawn by the program
Printout of the pattern drawn by the program
 1 LET B=0
2 LET A=0
5 LET C=0
6 LET E=280
10 LET A=A+1
15 IF A<=63 THEN GOTO 20
17 LET A=A-63
20 LET B=B+1
25 IF B<=43 THEN GOTO 30
28 LET B=B-43
30 PLOT A,B
40 PLOT (62-A),(42-B)
42 PLOT A,(42-B)
44 PLOT (62-A),B
47 LET C=C+1
49 IF C<=E THEN GOTO 10
50 LET A=A-1
52 IF A>=0 THEN GOTO 54
53 LET A=A+63
54 LET B=B-1
55 IF B>=0 THEN GOTO 57
56 LET B=B+43
68 UNPLOT A,B
69 UNPLOT (62-A),(42-B)
70 UNPLOT A,(42-B)
80 UNPLOT (62-A),B
90 GOTO 50

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.