# Preface

Creating beautiful images with math and computer programs has fascinated us since the early days of the fractal craze in the 1980's. The challenge of writing programs that implement mathematical algorithms, and then being rewarded with beautiful images is addictive. This also gives us the feeling of catching a glimpse of the platonic world of mathematics. Some people see elves and kaleidoscopic images when taking DMT (Dimethyltryptamine). Here you can create kaleidoscopic images using only a computer, and there are no elves to get in the way.

All the software used in the creation of the images in this book are free for readers to use and generate their own SVG images. It can be downloaded from the book's website at:
http://www.abrazol.com/books/patterngen/
The software consists of small programs written in the C programming language that can be run on all major operating systems. Inside the book are 327 images serving as inspiration for the kinds of images you can create. There are an infinite variety of images you can generate using the software that comes with this book, providing a computational image generation lab.

The origin of this book goes back to around 1990 when Stefan wrote up some notes on L-systems. He recently rediscovered the notes among his papers and we decided to combine them with some recent work that we have been doing in automaton theory and the combinatorics of words. What is really new in this book, in terms of computational art, is the use of Christoffel words and automatic sequences for binary string production, as well as the use of finite automata for translating the binary strings to turtle drawing instructions. The use of finite automata allows the same binary string to produce many different drawings. We also used finite automata and a context free language generator to exhaustively look at L-system strings of a specified form of lengths 4 through 6.

The first part of this book covers Christoffel words, automatic sequences, and paper folding. A testament to the richness of Christoffel words is the fact that it occupies nearly half the book. The second part of the book covers Lindenmayer systems. Appendix A lists the automaton files used in the book, which can also be downloaded from the book's website. Appendix B is a table of continued fractions for square roots from 2 to 99, useful for Christoffel words. Appendix C describes the software we have developed for this book. And finally there is a reading list for going further.

May you find beautiful patterns in the infinite world of computational images.

Stefan Hollos and Richard Hollos
Exstrom Laboratories LLC