Historic Manuscript Archive
Computer Art with Basic for apple II
Herbert W. Franke (1984) – article published in a German Home Computer Magazine
Instead of a brush, a monitor uses an electron beam. Instead of a canvas, a luminous glass pane. It doesn’t need a hand to apply paint – electrical impulses do it for him. It is a pleasure to watch him work: In a flash he throws coloured strokes onto the screen, you can’t look that fast – and the painting is finished.
The magic of electronic images, the speed, the precision… whoever watches them being created for the first time is thrilled. And the joy of it doesn’t diminish when you have become an accomplished programmer and the computer executes your own programmes.
Two things have to come together in art – the idea and the technique. The computer takes the technique off from us, and so we can concentrate on the idea.
Computer graphics did not originate due to artistic purposes, rather it was the desire to make data from science, technology and business visible in a memorable way. You don’t need ideas for this – the business shares and balance sheets – or whatever – are given. On the other hand, anyone who decides for the first time to use the computer graphics system as an artistic instrument will first ask himself what he actually wants to depict. He must have the ideas himself, but there are a lot of suggestions and tips that can make the task easier. I want to give suggestions for artistic designs by means of some examples now. Since I have an Apple II at my disposal, the programmes are written in the corresponding BASIC version. However, they are by no means limited to the Apple – anyone who has understood the concept can easily transfer them to any other graphics-capable home computer.
Maybe we shouldn’t start with the high art right away, the small one might be enough for the beginning. And what is that beautiful saying? – Symmetry is the art of the little man. We encounter symmetrical things in nature at every turn. Flowers and leaves are typical examples, but also the bodies of animals – not excluding those of humans. But even here it becomes clear that not all symmetry is the same. For example, the law of form of a flower is clearly different from that of an animal skull seen from the front. But there are also other principles of symmetry that are not necessarily realised in nature, but can easily be produced with the computer. The old art of ornamentation is therefore far from obsolete; it is precisely the computer that is capable of reviving it completely.
The simplest form of symmetry – whereby we now restrict ourselves to the two dimensional space [FH1] [SP2] – is mirror symmetry. What appears on the right is also found on the left… Repetition laterally reversed – this marking is already sufficient to get to grips with the matter.
So first we need an axis – for which a coordinate axis, preferably the y-axis, is ideal. Since it is usually located on the left edge of the image in the computer’s graphic fields, we have to move it to the centre. This is the simplest form of a “transformation”: A replaced by H + A. In order to achieve the first result, a bilateral form, we distribute some arbitrary graphic elements, for example rectangles, in the left half of the picture. A mirroring now means nothing else than a change of the sign in relation to the mirror axis. In our case, therefore, the coordinates H-A must appear in the graphic instructions in addition to the coordinates H + A. The same procedure could of course also have been carried out on a horizontal axis: B replaced by H + B; in addition to H + B, H – B also occurs. This results in the reflection effect that we can observe on a calm water surface. Otherwise, nothing essentially new comes to light. The ornamental effect is greatly enhanced if the reflection is now carried out on both the horizontal and the vertical axis. This results in a simple kind of kaleidoscope, a game popular with computer graphic artists. There is nothing to stop you from setting the kaleidoscope image in motion by repeatedly applying new graphic elements in changing colours.
In order to obtain four-line symmetry, one only needs a representation in the upper left quarter as the initial image. A form of symmetry that only rarely occurs in nature is obtained through the so-called point reflection. Compared to mirror symmetry, in which the left image is folded over only once – to the right – point symmetry requires folding over twice: First, the figure of the left half is folded to the right, and then the part of the picture that now appears on the right side is folded over again around the horizontal central axis.
Similar to computer games, the random command, given by RDN (1) in the case of Apple, is also gaining special significance in computer art. If you call it up, the computer outputs any number between zero and one. You can use this process as a die and thus leave some decisions to the computer that you would otherwise have to make yourself. In principle, one can assign a random number to each variable; in the case of computer graphics, this will be necessary especially for coordinate specifications or colour selection. The margin – decimal numbers between zero and one – may seem ill-suited to this task, but nothing could be simpler than extending the range of numbers rolled. This results in an equal distribution of numbers between zero and 15.999 999…. Assigning this expression to the symbol for colour, then the decimal places are cut off (so you don’t have to worry about that), and constantly changing colours appear on the screen.
Now, of course, it can happen that you want to intentionally reduce the colour palette. The simplest way to do this is to select a smaller group from the selection range of sixteen. If you want to leave the computer not only the choice of colours but also the choice of positions, then use the random generator to determine the coordinates, for example for the corner points of the rectangular elements. For the low-resolution graphics of the Apple II, one needs both for the x- as well as for the y-values a range between zero and thirty-nine. Only now does the above proposal for a kaleidoscope lead to a satisfactory result! We leave the choice of coordinates as well as the colours to chance; since the initial figure only comprises the upper left quarter, we only need to provide a range between zero and nineteen for A and B.
When you start experimenting with computer graphics, you involuntarily follow the example of painters and graphic artists who work by hand. This means that one element after the other is applied, dots, strokes, bars…. and these are grouped as you wish. In addition, the colour is selected. As long as the corresponding colour is not changed, the computer applies the elements in this colour. This also corresponds to the painter who dips his brush into a pot of paint and then stays with his colour until he decides on another one.
But the computer graphics system also enables a completely different way of working, which follows more the example of the television picture. We know how it works: the electron beam scans the screen line by line, touching all the screen dots. With a black-and-white screen, the intensity of the electron beam changes from point to point, and thus the grey-scale image is built up. With a colour screen, a colour value must also be assigned to each point. The computer graphic artist can also proceed in this way. With his programme, he first focuses on the first raster element, usually located in the upper left-hand corner, and assigns the colour to it. The same is repeated for the second point of the line, then for the third and so on. And as with television, the image builds up in this way.
What matters is the colour. While we know quite well how to build up an image from graphic elements, this is much more difficult in the case of our “raster graphics”. The interesting thing about it, however, is the fact that you can achieve completely different types of images this way than with the conventional method.
Of course, this method would be extremely cumbersome if one wanted to determine the colours in the programmes point by point. This can be avoided in various ways, for example, by using chance. However, it is even more exciting to determine the colour with the help of mathematical or logical functions. For the mathematicians among the readers, it should be said that these are functions of two variables.
You can think of the z as the height above a field built up by x- and y-coordinates. Just as is done with maps, the height ranges can also be indicated by colours. But even for those who are not particularly enthusiastic about mathematical questions, the grid method can prove fruitful.
The BASIC we use for our graphic also understands the usual symbols of algebra, for example +, -, /, and so on. As we all know, these symbols can be used to connect different variables and thus obtain expressions for which mathematicians have special names. But we don’t need to worry about that here, it is much more informative to try it out for yourself. Of course, this procedure does not work entirely without thought. For example, one must ensure that the numbers assigned to the colours do not become negative and – in the case of the GR graphic of the Apple II – do not go above fifteen. A certain limit is set to this method by the computing time. Even somewhat more complicated expressions cause waiting times of several minutes, even with low-resolution graphics. If you want to try the same thing with high-resolution graphics, you should allow a whole night for the image construction – after breakfast you can then look at the finished image.
During the first experiments, you will experience many surprises, and some of them will be unpleasant, because not every attempt will be successful. With time, however, one learns surprisingly quickly which configurations can be achieved with mathematical formulas, and only then does surprising new territory open up. The computational processes that are available on every computer turn out to be virtually formative elements that can be used specifically to produce images, provided that a certain amount of knowledge has been acquired.
As already mentioned – with high-resolution graphics, it is the time required that prohibits the use of complicated calculations. One is more likely to make do with simple elements, especially strokes, to build up one’s graphics. Strangely enough, however, there is a trick that leads to surprising picture effects time and time again. In the simplest case, it is the dissolution of strokes into staircase curves – which naturally annoy scientists and technicians because they reduce the precision of reproduction. Applied in a targeted way, however, this phenomenon often leads to surprising patterns, squiggles, garlands – the entities of such a high degree of difficulty that a targeted programming – especially if one only has a home computer at one’s disposal – would take days.
The patterns that emerge are not predetermined by the image-describing data, rather they are created by an interaction with the screen. This always happens when the scale of the graphic elements, for example the line thickness, approaches the resolution limit of the image grid. The image and the screen interact in the same way as two fine silk fabrics viewed through the light. There, this effect is called moiré. In the special case of screen graphics, these moirés can also be coloured. This, too, is quite welcome to the user of a home computer, not least because high-resolution graphics usually provide only a few colours. This palette can be expanded in this way.
A few tips can also be quite helpful for creating moiré patterns. If you place the strokes very close together, there will be no moirés, but uniform colour areas. If the distances between them are too great, the staircase effect will appear, but an overlapping pattern will not. It is best to leave spaces between the line elements that are approximately equal to the line thickness or even a little larger. Especially when these straight lines are not parallel, but at an oblique angle to each other, new and remarkable variations emerge again and again.
In the two exemplary programmes that I place at the end of this introduction, all the effects described were utilised. The resulting figures are symmetrical in four lines; with the help of random generators, both the colours and the image-determining coordinates change. In the process, any number of build-up processes are set one after the other; the consequence of this is that the following image is superimposed on the previous one. In this way, an additional variety of picture design is created, since there are also interactions between the individual parts of the picture. In order to achieve great variability in this direction as well, random generators are switched on that also change the line spacing in an unpredictable way.
The first programme, MIKADO, is still very reminiscent of the well-known kaleidoscope figures. According to the conception, simple pictures are created at first after switching on, which gradually become more complicated by the addition of further elements. It is then up to the user’s taste at which point he considers the picture to be complete and stops the sequence. The second programme, BUEHNE, also makes full use of the moiré effect. A square lying in the centre of the surface serves as the base from which the images fan out. A random generator determines whether the line elements are applied in the direction towards the centre or outwards. As they lengthen in the process, the impression of rectangular surfaces in perspective is created. One could imagine the whole thing as a view of a stage bordered by ornamentally decorated floor, ceiling and side surfaces. However, images of this kind could also be used practically – for example as a background for a writing placed in the middle.
In contrast to conventional fine art, there are still no fixed rules, no evaluation system for computer graphics. Those who work in this field therefore have the greatest possible freedom – and far more chance of producing something new, something never shown before, than a painter or graphic artist working with hand tools. Certainly not everything that is created with the help of computer programmes has artistic value, but why should something not one day emerge from these simple beginnings that is on a par with the great works of painting.