Colors From Taiwan (GRAPHICS 11 Demo)
- Type
- Graphics
- Category
- GTIA 16-hue line-art demo
- Author
- Masahiro Mori (multicolour version suggested by the Antic editors)
- Published in
- Antic, March 1984 (Vol. 2, No. 12), I/O Board letters page
- Year
- 1984
- Language
- Atari BASIC
- Requirements
- GTIA chip (any XL/XE, or a 400/800 with GTIA), 16K RAM, Atari BASIC
- Tags
- antic, io-board, gtia, graphics-11, line-art, short-program, demo, masahiro-mori, 1984
About the program
"I have designed a GTIA program with colors and a beautiful design. You can put this program in ANTIC magazine." That was the whole of Masahiro Mori's letter from Taichung, Taiwan, printed on Antic's I/O Board in March 1984 under the heading "Colors From Taiwan". The editors added a two-line change to make a multicoloured version, and both went on the monthly disk as TAIWAN.BAS and TAIWAN2.BAS. Mori soon became one of the magazine's youngest regular contributors, with programs such as Three Color Demo and Mole Attack.
What you need
GRAPHICS 11 is a GTIA mode, so you need any XL or XE, or a 400/800 fitted with the GTIA chip.
Typing it in
Both listings are plain text. TAIWAN2.BAS differs only in lines 5, 30 and 35. Each runs for ever and starts a new pattern after every pass, so press BREAK to stop.
How it works
GRAPHICS 11gives 80 × 192 pixels in up to 16 hues at a single brightness.COLOR Zchooses the hue, from 1 to 9 here.- Each pass runs
Ifrom 1 to 79 whileXmoves down the screen two lines at a time. Line 40 draws a horizontal line fromIto79-Iat rowX, and line 50 mirrors it at row190-X. The lines get shorter towards the middle of the loop and longer again after it (onceIpasses 40 the line is drawn right to left), which gives the bow-ties and diamonds. Xis never reset, only wrapped back to 0 at the bottom (line 60). So each new pass starts at a different height and the pattern changes every time.- TAIWAN.BAS changes the hue once per pass (
Z=Z+1in line 70). - TAIWAN2.BAS adds 1 to
Zfor every line (line 30), so the pattern is striped through nine hues.
Variations to try
- Change
IF Z>9toIF Z>15to use all fifteen hues. - Change
X=X+2toX=X+1for solid shapes instead of fine lines.
Listings
TAIWAN.BAS:
5 Z=1
10 GRAPHICS 11
20 FOR I=1 TO 79
30 COLOR Z:IF Z>9 THEN Z=1:COLOR Z
40 PLOT I,X:DRAWTO 79-I,X
50 PLOT I,190-X:DRAWTO 79-I,190-X
60 X=X+2:IF X>190 THEN X=0
70 NEXT I:Z=Z+1:GOTO 10
TAIWAN2.BAS (multicolour version):
5 Z=0
10 GRAPHICS 11
20 FOR I=1 TO 79
30 Z=Z+1:IF Z>9 THEN Z=1
35 COLOR Z
40 PLOT I,X:DRAWTO 79-I,X
50 PLOT I,190-X:DRAWTO 79-I,190-X
60 X=X+2:IF X>190 THEN X=0
70 NEXT I:Z=Z+1:GOTO 10
Download
The original program from the Antic disk, to LOAD or ENTER instead of typing it: TAIWAN.BAS, TAIWAN2.BAS.
Credits
- Program listing: Colors From Taiwan (GRAPHICS 11 Demo) — program listing (Antic, March 1984 (Vol. 2, No. 12), I/O Board letters page) — Masahiro Mori (multicolour version suggested by the Antic editors)
- Picture: Left: TAIWAN.BAS draws each pass in one hue. Right: TAIWAN2.BAS, the editors' multicolour version, changes hue on every line. — Masahiro Mori (multicolour version suggested by the Antic editors) (program); screenshot by the site
- Antic, March 1984 (Vol. 2 No. 12): I/O Board - Colors From Taiwan, letter from Masahiro Mori (atarimagazines.com) — Masahiro Mori (multicolour version suggested by the Antic editors), 1984
- Antic disk, March 1984 - Vol. 2 No. 12: TAIWAN.BAS (detokenized listing) — AtariMagazines.com (Kevin Savetz), 1984
- Antic disk, March 1984 - Vol. 2 No. 12: TAIWAN2.BAS (detokenized listing) — AtariMagazines.com (Kevin Savetz), 1984
