Mandelbrot Revisited

I have decided to update the Mandelbrot viewer I originally wrote as a quick Lazarus test application. The original used standard TBitmap handling which was painfully slow, especially on low powered hardware such as Raspberry Pis.

mandelbrotrewrite

I have re-written it using the compact image class detailed in the Fast Bitmaps articles, including an option to use the experimental OpenGL interface. This has had a dramatic effect upon the rendering times,  they are now universally sub-second on my laptop.  I have not yet re-test on the Pi, but they should be much improved there too, although I might need to implement an OpenGLES interface to really stretch that hardware.

In addition to testing the new graphics library, I have structured the program so that it can be used as a test-bed for comparing different rendering methods.  The current options enable the comparison between using Pascal single and double precision floating point alongside SSE assembler.  At present it would seem the FreePascal compiler is capable of writing more efficient assembler than I can!

This is still in its infancy as I intend to add in multi-threaded rendering tests and not to mention, modernising the OpenGL code to remove its dependencies upon the depreciated API glDrawPixels.  Anyway, progress with these experiments will be posted here in due course.

Leave a Reply