Recreation F r a c t a l s , Bitrnaps, a n d A P L How can we efficiently generate these boolean matrices in APL? In the case of the Sieg~inski carpet, we could use the following r~2ursive solution, due to David Sabzman: CABPE20: Jeffrey Shatlit (2,z,f),Eo3(2,<(p2)po),2),[o] T~T,T+CARPETO ~-I : e:O : 1 1P! ABSTRACT 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 t h e 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
/lp/association-for-computing-machinery/fractals-bitmaps-and-apl-LvrqRtfdiB