The ZX81ís graphics be a lot of fun to program. Although I wasnít a big fan of the
PLOT command, I do have some examples of its use. My taken on the TS logo for the rock band Twisted Sister is one one example. Like a primitive screen saver, it can be fun to watch.
Not quite what it seems.
The build process is like Picture, where the program progressively builds the logo over time. The process is mesmerizing and obvious. Watching each step, it isnít hard to figure out how that the letters are built using layers of lines. Once done, the program draws a final circle around the letters to complete the logo. I should note the logo isnít true to the original. I was just having fun.
Yet, if you were to run the original version of this program, youíd need a printer to get the full effect. TS uses
LPRINT to finish the logo. I used to have the TS2040 thermal printer, a peripheral my parents bought me early on. Iím glad they did because it is how I preserved all the programs I wrote, but I digress.
In the original program, the
COPY command dumps the current screen to the printer. Once printed, the logo is completed by printing a stylized title using
LPRINT. This is done six times so you could cut it out and display it. I still have the sheet attached to my program listing.
Since most people will be running this on my web site, I decided to comment out the printer commands. Instead, after the program finishes the logo, I print the logo at the bottom of the screen. I donít like the look as much as the printer version, but it still conveys the intent.
A surprisingly simple program.
Although not short, the code for TS is straight forward. The guts are at the bottom of the program. Starting at line 1000 is a line drawing function. At line 2000 is the start of the circle function. Youíll find the rest of the program is filled with loops, setting variables, and calls to those functions.
The build process is efficient, with multiple lines drawn within each loop. This kept the program compressed and shorter than it could have been. The line drawing function copies the variables, allowing me to reuse variables when they didnít change. It appeared I planned the drawing out well. I couldnít find any evidence I rewrote the code. Kudos for my teenage self getting this one right.
Although most of the program uses plot, there are two instances where I used
LPRINT, is for the title. Although I could have created it using lines, the single
Looking over the program, I couldnít find any changes to make. Perhaps I could find a way to drop that first
♫♪ ďWeíre not gonna take it
No, we ainít gonna take it
Weíre not gonna take it anymoreĒ ♪♬♪