Classic Computer Magazine Archive ANTIC VOL. 2, NO. 6 / SEPTEMBER 1983

PATTERN MAKER

Art Class Artifact

by Frank Roberts

Requires 32K RAM

As an art teacher I am intrigued with the possibilities of computer-generated art. My students also show a great deal of interest (and aptitude) for creating colorful and unusual shapes on a video screen. There seems to be a special delight in the interaction between TV and student which surpasses the usual forms of art media, such as pencil, paint and clay. While I do not think the computer will replace traditional art tools, I do see it taking a rightful - and timely - place beside them. We are at the threshold of new vistas and creations not possible before (a position similar to that held by the first photographers years ago).

This program is a result of an introduction to computer graphics which I do with my art students in relation to pattern making for fiber crafts, such as needlepoint, quilting and rug-making. The program is menu driven and includes instructions. It utilizes two arrays, X$ and Y$, to store coordinates which are "marked" by the user during the design stage. Drawing on the Graphics Mode 7 "sketchpad" inserts the CHR$ of each coordinate into the appropriate arrays. The keyboard cursor (arrow) keys are used to draw the initial design on the sketchpad. Some unique and interesting designs and patterns can be created by plotting points in arcs and curves (see illustrations). When finished with the design, press the [Q] key and the program returns to the main menu.

The main menu shows five additional modes available to the user; mirror image, ink blot, rows of patterns, save design and load a design. The design may be stored as a disk file or on cassette. Mirror image will show the design transformed into a right/left pattern. Ink blot transforms the design into the inversion of the mirror image. Rows of patterns fill a GR. 8 screen with three rows of ink blots. This pattern mode, selection 4, takes some time to draw a complete screen - particularly if the sketchpad design is complex. For this reason an escape or abort is provided so that you don't have to sit forever and watch a not-so-successful pattern creep across the screen. Press [ESC] to stop the pattern, then press any other key to return to the menu.

The module beginning at line 1000 stores your original design. Line 2000 begins the retrieval routine. Saving and loading a design in this manner is very fast and economical because only the plotted "S" points are filed; most designs take up less than one sector on the disk or about 20 counter units on cassette. To save a cassette file, press both RECORD and PLAY on the recorder, then enter C: for the filename prompt. When the keyboard beeps, press any key. To load a file use the same procedure, but press only PLAY (not RECORD). Of course, the tape must be installed and queued properly beforehand. The program is structured around the main menu module beginning at line 700. All options enter and exit from this module, including program termination. The modules which perform the various menu options are initialized at the beginning of the program for clarity and RAM economy.

Note that line 860 is reserved for a screen dump command. The dump I use was written for a Prowriter or NEC printer by my friend, Jim Reilly, and is not included here since only those readers owning such printers would benefit. The dump loads into Page Six and operates from a user call. The user will need to supply his or her own screen dump if that option is desired; there are several good ones on the market.

This program is proving itself very useful in designing borders, needlepoints and textured surface renderings. My students are mesmerized by the designs they generate with this program. It has taken a lot of the drudgery out of creating repeated patterns - and taking the drudgery out of it all is what a computer is for, is it not?

Listing: PATTERNS.BAS Download

Frank Roberts is a teacher and software consultant who has written for several computer magazines. He is currently developing art/graphics programs for his own company, Kidstuff Software.