The Best of Creative Computing Volume 2 (published 1977)

Page 33 << PREVIOUS >> NEXT Jump to page:
Go to contents Go to thumbnails
This book is also available for the Kindle

The Computer "Glass Box" - Teaching with A Programming Language (computer art, MONDRAIN)

graphic of page

alone. (Of course, if one could trace sequentially through a scene, its
"connectedness" or "non-connectedness" could be determined easily.)

Possible extensions of this excursion into scene analysis include studying
perceptions and related questions about "spatially local evidence." 

COMPUTER ART

The world of computer art can be opened to students through a few simple APL
programs. Beginning with a foray into automated design, they can proceed to
engage matters of aesthetic judgement and artistic technique. 
For example, consider the following DESIGN program. 

PICTURE – SIZE DESIGN COLORS

[1] HOWMANY – COLORS

[2] PICTURE – COLORS[SIZE HOWMANY]

DESIGN uses some COLORS (symbols on the keyboard) and some SIZE (two dimensions
of a matrix) to produce a PICTURE. 

A simple program like DESIGN goes a long way with children. They seem never to
tire of it, for it can produce quite a variety of designs.

While these "computer hieroglyphics" may  have dubious aesthetic appeal, one can
imagine - instead of these typed symbols -- randomly generated swatches of
color, perhaps displayed on a television-like screen. 
Extensions of this approach to computer art include: (a) automating DESIGN, (b)
weighting the selection of COLORS, (c) asking for human judgment (Do you like it
or not?) in order to adjust weights on COLORS or other aesthetic factors, and
(d) piecing together several computer-generated PlCTUREs into a montage. 

Another approach to computer art involves viewing programs which simulate
artistic technique. For example, consider the program MONDRIAN below (named
after the Dutch abstract painter).

MONDRIAN

[1] CANVAS – 30 50 ''

[2] DAB: COLOR – 'O[]*'[?3]

[3] SIZE – 3 5 ?6 10

[4] PICK: PLACE ?30 50 – SIZE

[5] OVERLAP +/+/CANVAS[PLACE[1]+ SIZE [1]; PLACE[2]+SIZE[2]]*' '

[6] PICK IF OVERLAP > 2

[7] CANVAS[PLACE[1]+ SIZE [1]; PLACE[2]+SIZE[2]] – COLOR

[8] DAB IF (PERCENT ' ' ON CANVAS) > 67

[9] CANVAS

MONDRIAN begins with a blank canvas (arbitrarily set at 30 by 50). Then the
program chooses a random COLOR, SIZE and PLACE to DAB. 

OVERLAP measures the extent of overlap with DABs already on the CANVAS. 

IF OVERLAP is greater than 2, then it will PICK another PLACE. (This is
tantamount to finding relatively open space on the CANVAS). 

IF, however, OVERLAP is not too large, the COLOR is put on the CANVAS at the
PLACE and in the SIZE selected.

The program continues to DAB IF the PERCENT of blank spaces ON the CANVAS is
greater than 67. In other words, as soon as it is 1/3 filled up, CANVAS is
displayed. 

Note: MONDRIAN uses two simple sub-programs (mostly for readability). They are
PERCENT and ON:

HUNDREDTHS – PERCENT N

[1] HUNDREDTHS – L0.5 + 100 * N

DENSITY – SYMBOL ON PICTURE 

[1 DENSITY – (+/+/SYMBOL = PICTURE) | (* / PICTURE)

Now, MONDRIAN at work:

MONDRIAN 

Possible extensions of this kind of program include: (a) simulating and
combining additional artistic techniques (those that can be operationalized),
(b) computing abstract measures of difference between random "paintings"
produced by the computer, (c) converging to minimal differences from a
previously specified "ideal" painting, and (d) developing a model for aesthetic
judgment -- perhaps one which "evolves." 

Conclusion

These are but a few APL "glass box" programs designed to stimulate students to
think about selected concepts. Each of the sample programs shown here can be
used as is and, of course, can be extended in a myriad of directions. Other
topics well-suited for this pedagogical approach include some drawn from
linguistics, statistics, mathe

Page 33 << PREVIOUS >> NEXT Jump to page:
Go to contents Go to thumbnails
This book is also available for the Kindle