mandel_cpp.html30 KB
mandel_cpp.tar360 KB

My first really serious fractal generator was mandel. It all started with a trip to Old Forge, a town in the Adirondack mountains where my family used to vacation. I was about sixteen years old and had bought a C++ book, but didn't really have anything to compile my code with on the laptop that I brought along. So I wrote this whole program in Word, several hundred lines of completely amateur, untested C++. (Really, it was just C; I didn't know anything about classes.) When I finally got home so I could test it, the compilation failed miserably. It was so broken it wasn't even worth trying to get it working. This original program, MandApp.C was scrapped, and I started over from scratch

The final product was mandel. It was by at least an order of magnitude my largest coding project at the time, weighing in at just under 2,000 lines of code. It did everything I wanted. It could draw using ANSI color. It could render Julia sets. It could animate a series of Julia sets along a line. All in full ASCII glory. I even went so far as to write a man page.

I have made minor changes to the code to get it compiling again. Apparently the complex class is now templated for double and float, so I had to go back and declare that. I also fixed a bunch of warnings about standard includes. Other than that, the code is as it was nearly a decade ago when I last worked on it.