The program uses three nested FOR-NEXT loops to print the graphics image. The first loop starts in line 540. It steps through the horizontal rows of the array BUFFER%( ). The step value is 3 because we print the array three rows at a time.

Line 550 selects the triple-density 24-dot graphics option with 360 columns of graphics data. (Remember that we must send 3 bytes of graphics data for each column.)

Line 560 starts a loop that steps through each column of the array, and line 570 starts a loop that steps through each of the three rows that make up this print line. Line 580 sends the selected bytes of graphics data to the printer. Lines 590 and 600 end the respective loops and line 610 sends a line feed to advance the paper after each line is complete. Line 620 ends the outermost loop, starting a new line.

When the entire curve is printed, lines 630 and 640 reset the printer to l/6-inch line spacing and terminate the program.

While this program is of little practical value, it illustrates the elements required to do plotting with the SQ-2000. We have used a very simple curve for illustration so that it wouldn’t take too long to run. The formulas in this program can produce some striking designs with very slight modifications. If you are patient enough (this will take about 20 minutes to run), make the following changes to the program:

Line 220-Make RADIUS2 = 2.2

Line 250-Make ANGLE = 0 to 70

The resulting curve will look like Figure 6-11.

Figure 6-11. Curve produced by minor change in plotting program

84