Classic Computer Magazine Archive COMPUTE! ISSUE 21 / FEBRUARY 1982 / PAGE 112

Moire Magic

Leo Cerruti
Syosset, NY

This program produces such beautiful three-dimensional effects in any of four graphics modes that you will, in all likelihood, find yourself staring at the screen and shouting "Hey look at that one..." for hours on end.

This program is user controlled—you can request the density and type of patterns you like. Making use of the "attract mode" produces constant variations in color and intensity and you will never see the same pattern twice. There are two pattern options to choose from: center oriented and corner oriented. That is, lines will emit from the center of the screen or from the corners, as you wish.

Useful Subroutines

This program makes use of several subroutines which should prove useful in many other types of programs, both graphic and nongraphic. For instance; the subroutine from lines 1060 to 1075 causes the word START to flash within the sentence. Line 1070 demonstrates use of the START switch, line 1080 sets attract mode.

When the program is run, it will prompt you to press START to begin. After this it will ask you which graphics mode you wish, modes 3,5,7 or 8. Remember that you need at least 16K to operate in GR.8. The next prompt asks how much maximum spacing you want between the lines drawn on the screen. I suggest numbers between 25 and 40 for GR.8 and 15 to 25 for GR.7. The computer will randomly space the lines up to your maximum. It will never give a spacing of two or less, to prevent filling up the screen with lines or blanks.

You are then asked which pattern you want. Center patterns give a cartwheel moire effect while corner patterns give more of a three-dimensional effect similar to depth lines drawn on a flat plane to give the illusion of distance. Either choice has its own special effects which demonstrate the Atari's superior graphics and color capabilities. You are then asked if you want changing colors. If you type "Y," the "attract mode" is set. Then, happy viewing.

By the way, if you select attract mode do not touch any keys because this will set the "attract mode" counter back to default colors. After each complete cycle in both the center and corner patterns the drawing will pause, select a new line spacing, and then continue. The longer you let the drawing continue, the more complex it will become. You can press CTRL 1 to pause the drawing at anytime, and to continue, press CTRL 1 again. Pressing the BREAK key will end the drawing.

Program Modules

LINE# DESCRIPTION
0–4 Displays title and jumps to line 1060 which instructs user to push START to begin.
6–9 Requests which graphics mode to use and jumps to lines 1000 to 1030 to set screen margins for the appropriate mode.
10 Requests maximum number of spaces to use between each line.
12–14 Requests corner or center effect moire patterns. Program jumps to line 16 for center pattern or line 600 for corner patterns.
1050 Will set attract mode if you wish.
1060–1090 Will display instruction to push START button and wait for you to do so. Type the word START and a space before and after an inverse video in line 1065. Use normal video for the word START and the spaces before and after in line 1075. This will flash the word START within the sentence.