10 REM Program name "PATTERN"
20 REM Written by M.L.W. 4/6/1988
30 REM Article by Keith Devlin
40 REM Computer Guardian 2/6/1988
50 REM Sent to 8BIT SOFTWARE 16/2/94
60 :
70 N=0:D=0
80ONERROR:REM
90 MODE7
100 PRINT'' :PRINT N,D :PRINT''
110 INPUT"Type in a number between 1 a
nd 359"'"inclusive. "N
120 PRINT
130 INPUT"Type in a SECOND number from
1 to 359"'"inclusive. "D
140 MODE0
150 COLOUR 1:J=RND(6)
160 VDU 19,1,J,0,0,0
170 oldX=0: oldY=0
180 VDU 29,640;512;
190 MOVE oldX,oldY
200 A=0
210 FOR JJ=1 TO 22000
220 A=A+D
230 IF A>360 THEN A=A MOD 360
240 X=((N*A)MOD360)*0.01745
250 R=SIN(X)
260T=A*0.01745
270 newX=R*SIN(T) : newY=R*COS(T)
280 newX=500*newX :newY=500*newY
290 DRAW newX,newY
300 NEXT
310 INPUT"Do you want another go?"z$
320 IF z$="Y" OR z$="y" THEN GOTO 90 E
LSE END
330END