Computer art for the Tektronix 4052.Joe Jacobson.

Computer Art for the Tektronix 4052

A common motif in analytical computer art is the polar coordinate curve. This has the form R=f(A), where R is the radius, f is a mathematical function, and A is the angle. The angle parameter A is swept through some range of values, the radius R is calculated, and the computed polar coordinate points (R, A) are converted to rectangular coordinates and plotted.

The resulting curves frequently (but not always) exhibit angular symmetry; that is, they look the same after being rotated through a suitable angle.

Like many other computer artists, I had played with polar coordinate designs from time to time, but it seemed to me that the possibilities were limited with these curves. You generally ended up with designs like those in Figures 1 and 2, which are similar to the polar coordinate curves found in high school texts on analytic geometry.

It was with considerable interest that I became aware of an innovation in polar curve plotting by a fellow computer artist and engineering co-worker, Woodrow Europa. Woodrow repeatedly swept simple polar coordinate curves through the interval from 0 to 360 degrees, and incremented the radius by a fixed amount between sweeps. The result was similar to the design in Figure 3, and seemed more aesthetic than the patterns based on a single angular sweep.

Woodrow's program was written for the Hewlett-Packard 9825B desktop computer, which uses a language (HPL) that is somewhat different from standard Basic. I transcribed his algorithm into Tektronix 4052 Basic and used it to generate designs of the type shown in Figures 3 and 4.

Woodrow's algorithm used the polar coordinate function R = B{1-SIN(L[)), where L is a constant selected by the user, and B is increased for each successive angular sweep. Curves of this type, which incorporate trigonometric functions, display a high degree of angular symmetry and consist of lobes that look somewhat like flower petals (as in Figure 4).

Traditionally, small integral values of L are used; L = 3 in Figure 3 and L = 8 in Figure 4. It was generally assumed that increasing L would just increase the number of petals in the daisy-like design. This is what would be expected on purely mathematical grounds.

After a short while I stopped using this algorithm, because the variety of different pictures that could be made still seemed very limited. It sat in a tape file for a couple of years before I realized that I could, after all, create some unusual effects by using larger values of L.

This is the case because computer science is a bit different from pure mathematics. In particular, computers use finite increments and intervals. If the increment in the angle A were made smaller and smaller as higher values of L were tried, a simple daisy pattern would indeed result.

But if the increment in A was fixed at some reasonably large value, such as 5 degrees, only selected points on the daisy pattern would be computed; when these points were connected by straight line segments through use of vector graphics routines, new and novel patterns could be created. In fact, successive computed points could jump around on the background daisy pattern in a rather wild fashion.

A sample pattern is shown in Figure 5. This design was made using L = 16 in Woodrow Europa's algorithm. The angular increment was 5 degrees.

I then generalized Woodrow's algorithm in two ways. First, I incorporated five additional, carefully chosen polar coordinate functions, which are embedded in subroutines and selectable by inputting a value for the parameter N from the Keyboard.

Second, I made provision for inputting the amount (D) by which the radius B is increased for successive angular sweeps; and the amount (G) by which the angle A is incremented during an angular sweep.

In addition, I installed an option, selectable through the parameter T1, that enables the user to get a list of the values of parameters N, L, D, and G at the bottom of the picture. In this way a pleasing design can readily be re-created at a future date without straining one's memory.

I call the resulting program Sinusoidal Loop Program No. 1, and it can be used to create a large number of varied and striking patterns. Some of these are reproduced here (Figures 6-10).

The Program

The program is easy to use. It prompts the user to enter values for N, L, D, and G from the keyboard. When it asks for a value for T1, enter a 1. The picture will then be plotted (it takes 10 to 20 seconds on a Tektronix 4052) and the parameter values listed at the bottom.

Then press the HOME/PAGE button to clear the screen and hit the RETURN key; the picture will be plotted again, but this time without the parameter values. (Alternatively, if you don't want a parameter value list at all, enter a 2 when the program asks for T1, and you will get a "clean' plot the first time.) Type RUN to execute the program again for the next picture.

Table I lists the ranges of input parameter values that I have found to give good results with this program. However, some values outside these intervals could conceivably make good pictures too. The patterns tend to repeat for L values larger than about 60 (with G = 5 degrees). The parameter values don't have to be integers; I have had good results with decimal fractions like L = 17.2 and L = 29.2.

In fact, if you change the L value by as little as + 0.1, you may get an entirely different picture. This, again, is something that was not realized historically. Similarly, small changes in the angular increment, G, can have a big effect.

Sinusoidal Loop Program No. 1 is the first of several recent computer programs I have written using polar coordinate functions; some of the others are further generalizations of Woodrow Europa's algorithm and some are completely new. They will all appear in Creative Computing over the next few months.

In order to use these programs you will need access to a Tektronix 4050 series terminal, which is used here as a stand-alone microcomputer, or some other system having extremely high CRT screen resolution. (Unfortunately, the vast majority of home computers do not have the necessary screen resolution. However, if you have a good mechanical X-Y plotter, that will do nicely.)

The programs generally take up about 6K of memory and use vector graphics. They are written in Basic, but the graphics commands (MOVE, DRAW, WINDOW, and VIEWPOINT) are machine specific. You will have to adapt the programs to your own graphics system.

Even if you don't have access to a suitable computer, I hope you will find the algorithms interesting (a complete source listing will accompany each article) and that you enjoy the sample output designs that will be reproduced with each listing.

Table: Suggested Parameter Values.

Photo: Figure 1.

Photo: Figure 2.

Photo: Figure 3.

Photo: Figure 4.

Photo: Figure 5.

Photo: Figure 6.

Photo: Figure 7.

Photo: Figure 8.

Photo: Figure 9.

Photo: Figure 10.