/A/ /M/A/G/N/I/F/I/C/E/N/T/ /P/L/A/C/E/
15:28 Wednesday 6 January 2010
In December of 2009 I contacted Jens M. Andreasen, the author of Mx44 a softsynth for Linux using the JACK audio server and said I wanted to do some coding on it, particularly with trying out different GUI layouts.
Not much happened in the way of experimenting with different GUI layouts, as Jens had his reasons for the way it already was. Instead I worked on removing some of the code which used GTK2 functions which were deprecated in favour of other functions.
I then added further command line options for loading patches, as this was something I had had trouble with in the past. Then I updated one or two JACK functions which were also deprecated.
I also mentioned to Jens about removing the ALSA and OSS audio output code as it seemed to be broken on my system, and he agreed with that.
We worked together for the two weeks leading up to Christmas, and he released the new version on Christmas Eve.
There were a few things we still wanted to do, but my coding with GTK on Mx44 had got me thinking about my fractal image generation program gkII - Mandelbrot Mangler. The deprecated GTK functions in that were many and causing compilation problems.
So I got to grips with updating the code in gkII so no more deprecated GTK functions were in use, it was something I had been putting off for over a year. I got that done and released the new gkII version on the 27th of December.
I then started getting interested in fractals again. I downloaded and built GnoFract4d and started trying to understand some of the equations. I also discovered another program, Fraqtive which treated what to me were completely different fractals simply as variants of the Mandelbrot-Set. So I got to work in gkII implementing these variants.
By this time, the actual fractal iteration code in gkII was getting extremely unwieldy! It was bad as it was, fully of repetitions of the same long switch statements containing iterative loops, getting on for 2000 lines of code in one function. Then I added more switch statements within switch statements.
And the code was getting slower and slower. To tidy it up, I created C preprocessor macros, containing all the elements in the code which were repeated again and again. This atleast removed the possibility of differences in two or more repetitions of code which should have been the same. The trouble was, I had only done half the work, I had not even begun to re-implement the auto-layering code.
And there were further problems with gkII. The worst being it uses a binary file format to save the data files. A data file saved on a 32bit system is not compatible with gkII running on a 64bit system. And the code was a mess.
Then I gave up with all the different fractal types and started playing around zooming into the Mandelbrot set. As usual I quickly came up again the wall where the standard 64bit double precision floating point maths breaks down because it can't handle the amount of precision required to zoom any further.
I decided I would experiment again with an arbitrary precision maths library. I had already done this a few years ago, using MAPM but due to older and slower hardware, had found it to be totally unusable, even for the default view of the M-set with a magnification of 1.
I decided then I would create a new program which would only calculate the Mandelbrot Set. It would be able to zoom in really deep by using the MPFR library. It would save data in text files rather than as binary data, and have command line options to render images without using a GUI.
As I've rambled on for long enough, I'll just tell you I've achieved this now. I've called the program mdz Mandelbrot Deep Zoom. You'll see the current version is not the first release but the third. Checkout the images in gallery directory.
I am planning, for the next release of mdz, to implement threading routines. Currently mdz does not use threads and consequently when it runs on a PC with two or more cores or two or more processors, it only utilizes one core of one processor.
For instance, the 'fuzzywuzzy' image on the right, took nearly five hours and ten minutes
to render. Had I have been using threading in mdz, both cores of the CPU would have
been put to work on this image and it might have taken only 2-3 hours!
The fuzzywuzzy image used 360 bit precision floating point maths. As a comparison, the images I show in the Mandelbrot Exploration are all to be found using only 64bit precision floating point maths. The settings file for fuzzywuzzy can be read here.