Gossamer

See all articles from ZX-Appeal Dec 89
Author(s): Arthur Douglas
Publication: ZX-Appeal
Pub Details: ZX-Appeal Dec 89
Date: December 1989
Pages: 17

GOSSAMER creates beautiful patterns for the QL using sets of straight lines to create spirals and helixes. For more complex patterns increase the value of j in line 50. For asymmetrical patterns delete line 170 from the listing.

Gossamer was written by Arthur Douglass from London.

10 MODE 8
100 WINDOW 512,256,0,0:PAPER 0:CLS:BORDER 16,0
110 OPEN#3,CON_512x256a0x0:PAPER#3,0:CLS#3:BORDER#3,16,0
120 a=RND(1 TO 140):b=RND(1 TO 100):c=RND(3):d=RND(3):IF NOT c AND NOT d:GO TO 120
130 e=RND(1 TO 140):f=RND(1 TO 100):g=RND(3):h=RND(3):IF NOT g AND NOT h:GO TO 130
140 INK_CHANGE
150 FOR j=1 TO 300
160 LINE a,b TO e,f
170 LINE#3,(148-a),b TO (148-e),f: REMark Remove this Line for a non symmetrical pattern.
180 a=a+c:b=b+d:e=e+g:f=f+h
190 IF a>148 OR a<1:c=c*-1:INK_CHANGE
200 IF b>100 OR b<1:d=d*-1:INK_CHANGE
210 IF e>148 OR e<1:g=g*-1:INK_CHANGE
220 IF f>100 OR f<1:h=h*-1:INK_CHANGE
230 END FOR j
240 BEEP 10000,76:PAUSE 200:RUN
250 DEFine PROCedure INK_CHANGE
260 i=RND(1 TO 6)
270 INK i:INK#3,i
280 END DEFine

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