| ASCII Graphics |
Robert P. Munafo, 1999 Feb 3.
A Mandelbrot image is drawn on a 350x350 grid using the distance estimator method, which generates a good line-art rendition. The pixel grid is broken up into character cells, each 5x12 pixels in size. Within each character cell, six blocks are defined, each 2x4 pixels in size. The rightmost column of pixels in each character cell is ignored. A six-bit pattern value is generated by doing a true-or-false test on each of the six blocks. The algorithm first takes only the upper-left pixel in each block. If the resulting pattern value is 0, the algorithm recomputes the pattern value using the boolean OR of four pixels within each block. Once a pattern value is achieved, a character is produced by looking up in a 64-entry table. Figure A shows the bit positions assigned to each of the six blocks when forming the pattern value, and Figure B shows the mapping from pattern values onto representational ASCII characters. (Note in particular that several ASCII characters are used more than once.)
The result is 30 lines of text, each containing 70 characters plus a newline. A total of 12320 bits of information is expressed in 2130 bytes of text.
Here are some examples of images produced by this method: Feigenbaum point, embedded Julia set, paramecia, R2, R2.C(1/2), Seahorse Valley.
This work is licensed under a
Creative Commons Attribution 2.5 License
.