Visions (Graphics 9 Demo)
- Type
- Graphics
- Category
- GTIA shaded line-art demo
- Author
- Michael Metz
- Published in
- Antic, October 1986 (Vol. 5, No. 6), Tech Tips
- Year
- 1986
- Language
- Atari BASIC
- Requirements
- GTIA chip (any XL/XE, or a 400/800 with GTIA), 16K RAM, Atari BASIC
- Tags
- antic, tech-tips, gtia, graphics-9, line-art, color-cycling, short-program, demo, michael-metz, 1986
About the program
Antic's Tech Tips page for October 1986 opened with "two pleasing graphics demonstrations". The first, VISIONS.BAS, came from Michael Metz of St. Clair, Michigan, who was 17 and called himself a computer graphics "freak". He had been programming his Atari since he was 14. In twelve lines it fills a GRAPHICS 9 screen with mirrored fans of lines in sixteen shades, which meet as a pair of glowing diamonds. The whole picture keeps shifting colour as it's drawn. (The other demo on the page was the Salt Lake City ACE club's Rainbow Fan.)
What you need
A GTIA machine, which means any XL or XE, or a 400/800 fitted with the GTIA chip. GRAPHICS 9 doesn't work on the older CTIA chip.
Typing it in
It's plain text with no special characters. Press BREAK to stop. The program redraws for ever, starting a fresh screen after each pass.
How it works
GRAPHICS 9gives 80 × 192 pixels with 16 brightness levels of a single hue, which is set by the background register (SETCOLOR 4,hue,0).- The loop runs
Ifrom 1 to 79 whileXclimbs by one each time. Lines 40–70 draw four lines per step: two horizontal ones mirrored top and bottom, and two diagonals crossing between them. Together they build the symmetrical fans. COLOR I/2.5sets the brightness. Only the low four bits of the colour number count, so the shade climbs from 0 to 15 twice across the screen. That gives the two bright bands.- Line 30 calls
SETCOLOR 4,C,0with a new hueCon every step. In GRAPHICS 9, changing that one register re-colours the whole screen at once, so the picture cycles through all 15 hues as it grows. Each new pass starts with the next colour. - Line 100 pauses before
GOTO 10clears the screen and starts again.
Variations to try
- Delete
SETCOLOR 4,C,0from line 30 and addSETCOLOR 4,9,0to line 10 for a steady blue picture. - Change
2.5in line 30 to5for a single smooth ramp of brightness.
Listing
1 REM VISIONS
2 REM BY MICHAEL METZ
10 GRAPHICS 9:FOR I=1 TO 79
20 C=C+1:IF C>15 THEN C=1
30 SETCOLOR 4,C,0:COLOR I/2.5
40 PLOT I,X:DRAWTO 79-I,X
50 PLOT I,190-X:DRAWTO 79-I,190-X
60 PLOT 79-I,X:DRAWTO I,190-X
70 PLOT 79-I,190-X:DRAWTO I,X
80 X=X+1:IF X>190 THEN X=0
90 NEXT I
100 FOR D=1 TO 700:NEXT D:GOTO 10
Download
The original program from the Antic disk, to LOAD or ENTER instead of typing it: VISIONS.BAS.
Credits
- Program listing: Visions (Graphics 9 Demo) — program listing (Antic, October 1986 (Vol. 5, No. 6), Tech Tips) — Michael Metz
- Picture: One pass of Visions, caught while the hue was gold. The colour changes on every line drawn. — Michael Metz (program); screenshot by the site
- Antic, October 1986 (Vol. 5 No. 6): Tech Tips (atarimagazines.com) — Salt Lake City Atari Computer Enthusiasts (ACE), 1986
- Antic disk, October 1986 - Vol. 5 No. 6: VISIONS.BAS (detokenized listing) — AtariMagazines.com (Kevin Savetz), 1986
