Computer art for the Tectronix 4052.(Part 4)Joe Jacobson.

Computer Art For The Tektronix 4052

This month I will discuss my Sine Product computer program. This is somewhat similar in structure to the other polar coordinate programs I presented in recent issues of Creative Computing; it involves successive angular sweeps with the radius incremented between sweeps. However, a different polar function is used in Sine Product.

The radius is computed as the weighted sum of products of two sinusoids, or as the absolute value of that weighted sum (depending on the value you enter for the parameter M).

Technically, this program was more difficult to write because it required automatic scaling. The radius values computed can be very large or very small, depending on the input parameter values selected, and it is desirable to have the pattern just fill the screen in all cases. This scaling was accomplished through the use of storage arrays and an algorithm that finds the maximum value of the radius.

The parameters B, C, and H, which are requested in user prompts, are the weighting coefficients for the products of sinusoids. K and L are angular frequency coefficients in the arguments of the sinusoids. D is the radius increment added between successive angular sweeps. G is the angular increment within a sweep. Enter M=2 if you want the radius to be an absolute value; enter M=1 otherwise.

As with the programs previously described, setting T1=1 yields a design plot with the input parameter values listed at the bottom. Then you clear the screen and hit RETURN and a "clean' plot (without the parameter list) appears. If you don't want the parameter list at all, set T1=2.

Table 1 lists ranges of input parameters that I have found to give good results. Some values outside these intervals may also work well. Note that B, C, H, G, K, L, and D can be decimal fractions (i.e., not only integers) and some of these can even be negative. You should explore the possibilities inherent in this program by trying various combinations of parameter values.

Table: Table 1. Suggested Parameter Values.