Fractals, bitmaps, and APL

Jeffrey O. Shallit · ACM SIGAPL APL Quote Quad · 1988

In this article, we show how to generate approximations to fractals and fractal-like patterns using operations on boolean matrices.The pictures may be displayed on a bitmapped device like the Apple Macintosh.The methods illustrate the beauty and power of APL, as well as the suggestiveness of the notation.1.The Sierpirfski carpet.The Sierpiffski carpet is a fractal in the plane which is the limit of the sequence of pictures in Figure 1.In the limit, this carpet covers zero area.The "removal of middle thirds" used to generate it is reminiscent of the method for constructing the Cantor set [Man, p. 144].We can represent the sets in Figure i in APL as square boolean matrices, where 1 represents a black square, or pixel, and 0 represents a white pixel.For example, the first three pictures in Figure 1 could be represented by the three arrays 111 1 , 101 ,

Read the paper · More papers on PaperTik