News:

Welcome to RetroCoders Community

Main Menu

GW Basic Chaos Game

Started by ron77, Nov 21, 2023, 06:12 AM

Previous topic - Next topic

ron77

100 REM Chaos game
110 CLS
120 SCREEN 7    '320x200 EGA Color
130 X = INT(RND(1) * 200)
140 Y = INT(RND(1) * 173)
150 FOR I=1 TO 20000
160  V = INT(RND(1) * 3) + 1
170  ON V GOTO 180,210,240
180  X = X/2
190  Y = Y/2
200  GOTO 260
210  X = 100 + (100-X)/2
220  Y = 173 - (173-Y)/2
230  GOTO 260
240  X = 200 - (200-X)/2
250  Y = Y/2
260  PSET(X,Y),V
270 NEXT I
280 END