Recently I bought an inexpensive second-hand copy of “The armchair universe – an exploration of computer worlds” by A. K. Dewdney. Printed in 1988 it is a real classic. Computers now have much more colors, pixels and memory and they are much faster. But the ideas presented in this book are still interesting and can now be easier explored.
I extend the first method presented in the chapter “wallpaper for the mind” to get better images. John E. Connett has discovered the basic idea.
Basically, this is so simple that it becomes difficult to present. To begin, I only look at pixels that are far away from each other. Thus I have a square grid of points with a distance of typically 10 pixels. Each of this points has suitably scaled and shifted coordinates x and y. There I calculate some function z(x,y), such as the square of the distance to the origin z(x,y)=a(x*x+y*y), where a is a constant. Of the function value I only keep the fractional part, z-floor(z), to define the color. As an example: 2.71 becomes 0.71. This fractional part is a rapidly varying saw-tooth like function with a very short period. It is sampled only at the few selected pixels. The distance between these pixels is greater than the periodic length of the truncated function z. Thus we have strong aliasing or Moiré effects and this results in strange patterns, that vary in an unpredictable way with the parameters. For the yet undefined pixels I use linear interpolation between the known values. Finally, the numbers between 0 and 1 give the hue of the pixel, going from red at 0 to green at 0.333, blue at 0.666 and back to red for 0.999.
Often, the images repeat locally in space, nearly periodically with some variations. This is due to the two interfering periodicities of the pixels and the truncated function, similar to the quasiperiodic tilings obtained from two grids.