Mandelbrot Madness!

Version 2.0 -- Introduction and History

[Return to Index]


Mandelbrot Madness! is a powerful GUI-based program designed for generating Mandelbrot and Julia set images, browsing these fractals by "zooming" deep into their structures, and saving images and image parameters to files. Using its simple "point and click" interface, aspiring new Mandelbrot explorers can zoom deep within these fascinating graphs and save snapshot images or image parameters to files, which can be loaded and reused later.

Fractals are one of the most intriguing concepts in mathematics, and the Mandelbrot Set is perhaps the most readily identified example. (Which is interesting, because the set really isn't a fractal, but the plot of it is.) Discovered by the brilliant Polish mathematician Benoit Mandelbrot and published in his book Les objets fractals, forn, hasard et dimension in 1975, it is perhaps one of the most often displayed images in all of mathematics and computer science. The fascinating notion of a mathematical function so simple creating an infinitely intricate and visually breathtaking image is one that has intrigued scientists and mathematicians for years.

And now, thanks to Mandelbrot Madness!, you can explore this incredible, magical mystery from your own desktop, quickly and conveniently.

Below is a quick list of some of MM!'s many features:



Part One: Slavery to Bill Gates...

Mandelbrot Madness! started as a combination of curiosity about Mandelbrot images and fractals, and a desire to learn Visual C++.

During my senior year of college, I took a class in computer graphics. Instead of concentrating on software packages and how to use them, like the course one of my friends took at another school, our class concentrated on the fundamentals of graphics. Instead of using the cosine shading tool, we wrote our own cosine shading programs. Instead of loading up the latest, greatest ray tracing tool, we wrote our own. We also experimented with fractals, which always strikes a computer scientist's interest. And wherever there are fractals, there's the Mandelbrot set.

Being the ambitious little geek I was, I quickly took the Pascal code handed out in class, ported it to C, and had a handy little Mandelbrot renderer for DOS. It produced 16-color 480 x 480 gray-scale images. I even modified it somewhat to create a virtual slide show during one of our engineering open houses at school. The problem came when I wanted to capture the images to a file.

I never was familiar enough with the internal structure of the various popular image formats to trust myself to modify my DOS program to write to a file. For quite a while, the only method available to me was to run the program in a DOS window under Windows 95, then use an image editor such as Paint Shop Pro to do a screen capture. The image could then be cropped down and saved under whatever image format I could want. However, this imposed a number of limitations that I did not care for. Win95 could not support running SVGA in a DOS window, so I was limited to the 16 colors my compiler's graphics routines could support. For the same reason, I could only make images as large as 480 x 480 pixels. To complicate matters, juggling the different windows and screen captures was not fun, and seemed a bit too many hoops to jump through to obtain a simple image. What I needed was something that (1) could produce an image whatever size and color depth I wanted, (2) save it to a standard image format recognized by most image editors, and (3) would be a bit easier to use and more portable.

That's when I turned to Visual C++.

I took a Visual C++ class in school the same semester, but graphics projects and my senior project distracted me and I did poorly in the class. My gracious instructor was understanding, though, and was quite kind to me and gave me a decent grade. But I truly wanted to learn Visual C++, so I purchased it from the school and tasked myself to learn it on my own. My efforts wavered somewhat, until I finally obtained some computer-based training at work. Also, through the miracle of the Internet, I also happened upon some rather gracious young programmers in Denmark, who freely distributed their VC++ code to handle standard Windows DIB bitmaps. Thus, Mandelbrot Madness! was born.


Part Two: Liberation through Java...

I was quite satisfied (and full of myself) with the Win32 version of MM! It was quite a thrill knowing that I had put that Visual C++ knowledge to work, and I spent many an hour happily zooming deeper and deeper into the Mandelbrot set. However, there was just one problem: How do I share this new-found joy with everyone in the Internet? I had already decided I would build a small Web page devoted to MM! and allow visitors to download it freely. But how could I share MM! with visitors and entice them to download it? And what about all those out there who were not shackled into using an operating system built by Bill Gates? How could they share my fun when they aren't confined to DLLs and BMPs?

I had considered building a Java Mandelbrot viewer for some time, and the poor quality of many of those I had seen seemed to prompt me further down this path. So I decided to put my new knowledge to work and, armed with my notes from the Java class I took my senior year and the JDK documentation, I quickly set out to create what would ultimately become Mandelbrot Madness JAVA! 1.0.

MMJ! 1.1 (still available at our web site) would be a Java applet, confined to a Web page, and would allow visitors to the site to use a limited set of the tools available in the Win32 version. And it works quite well. However, never satisfied, I wanted more. While MMJ! 1.1 was great as a demonstration applet, it could never be much more than that. I really wanted to create a fully featured version that could do everything the Win32 version could do. Plus, there were a number of features I wanted to include in the Windows version of MM! that I had no clue of how to do in Visual C++, but implementing in Java would be relatively a cinch.

So back to the compilers we go....

MMJ! 2.0 was a relatively quick creation, taking only a couple months of off-again, on-again coding and design. A quick jaunt to the Web brought me to the discovery of a freely available series of Java classes for generating GIF images. And, after pouring over much code and drawing endless diagrams, I finally discovered a long standing bug that was plaguing the old Windows version and was working its way into this version. (Fixing this bug finally promoted the Windows version to 1.0.) And with the introduction of 3.0, even more features worked their way in, making the Windows version increasingly obsolete. (Hmm... Windows obsolete... I like the sound of that....) And I eventually found the wonderful PngEncoder class by J. David Eisenberg, so I could get away from the nasty patent problems with GIFs. All in all, it was a fun, exciting, and fulfilling project for me.


Part Three: Return to Darkness: .NET 2.0...

For a number of years, the Win32 version of MM! languished in the land of abandonware. MMJ! had developed a rather rich feature set, and I hated the thought of dragging out my now rather obsolete copy of Visual C++ and trying to update the original. The final nail in the Win32 version's coffin came when I realized that I had completely lost the C++ source, despite my obsessive tendency to take multiple backups. I eventually decided to completely abandon the original and concentrate on the Java version.

It wasn't long before the Java version itself began to grow dusty. I lost interest in developing the program and other interests (most notably my comic strip) began to take precedence. Eventually, I finally released version 4.0 of MMJ! and called both projects finished, releasing MMJ!'s source to anyone who might be interested.

Then in the summer of 2006, I started a new job in a new state. My life entered a state of upheaval as I found myself moving, buying and selling houses, and experiencing the thrill and trepidation of the birth of my son. In the midst of all this, I was starting a new job at a new company, and found myself learning a new programming language: C# .NET.

I found the transition from Java to C# relatively simple and straightforward. Although most of my official work was in developing Web applications, I was curious to see how C# .NET could handle standard Windows apps. I did a few minor experiments before I realized that Mandelbrot Madness! was the perfect choice to test my new skills. After all, it somehow became a programming tradition for me: learn a new language and try to find a way to generate Mandelbrot fractals with it. I did this with Visual C++, Java, and Perl, so why should C# be any different?

Using Mandelbrot Madness JAVA! 4.0 as a base, I began converting each class to C#. Along the way, I made a number of improvements, such as pulling common code (like the classes to represent the fractals themselves, the various palettes, and file handlers to read and write both) into a shared library that could be called from other programs. I learned the joys of the BackgroundWorker class and how multithreading the fractal generation could make the application more responsive. I worked feverishly on the project, surprising myself with the speed and zeal I undertook it with. I had found the joy of programming again, and I had new weapon in my arsenal to play with.


Version History

Below is the complete version history for Mandelbrot Madness!, including both Windows and Java versions:


[Return to Index]

© Copyright 2007, Jeffrey T. Darlington. All rights reserved.