Fractals

Downloads

Back in high school I became interested in fractals such as the Mandelbrot Set and the related Julia sets. I built a few simple programs to render them at different levels of detail, and eventually I and a friend developed what we called the “Fractal Explorer.” It was an application in which you could zoom and pan through the Mandelbrot Set, or define a Julia set and navigate through it. Unfortunately, the last stable build was lost, and I am currently working on recreating it.

I have also created several high-speed, multicore optimized programs for rendering fractals which I am working to make available. Originally, I wrote them in .NET 4 which includes some awesome features for working with multithreaded processes, but I discovered that there is a significant overhead with the .NET framework causing slowdowns in the code. As my CS studies progressed, I became more comfortable working in C and C++ as well as using the thread libraries available for them to run programs in a multicore environment. My latest C program for generating fractals outputs in Photoshop’s large document format (.PSB) since no other file format I have come across will handle the image sizes I have started working with: 2 or more gigapixels, or roughly 50,000 pixels square and up. Also, since these programs have been translated to C, they run 10-20 times faster than in .NET which was quite surprising to me at the time. However, on reflection, this is most likely due to the sheer amount of overhead which goes into .NET thread management where my C programs are doing potentially memory-unsafe operations.

During development of the Fractal Explorer, I built a shell program to just render the Mandelbrot set, but at huge scales. I eventually upgraded it while working with multithreaded applications in .NET, and got the below image. I ended up maxing out the image size in .NET, which is approximately 28,000px by 18,000px. Adobe Flash is needed to view it, but you should be able to pan and zoom through the image generated below.






I also built a console (command line) tool to generate a huge number of Julia sets just to see what was out there, and to try to stitch them together and see their relationship to the Mandelbrot Set. The first program I wrote generated 1200×1200 pixel images, and ran for about 5 days, and generated about 60% of the images I wanted. I rebuilt the program, optimized it for multi-threading, and ran it again. I was smart in this round and rendered only half of the possible sets since all the sets merely get reflected over the real axis. This batch took ~40 hours to render on an Intel i7 920, running at 87%-100% load and 75C (I need better cooling if I keep doing stuff like this). I also rendered the same set as 100×100 images and put them together; the result is below.






Interesting Julia Sets

Having rendered 30,500 images, it is not unexpected that many are quite uninteresting, so I have a selection of interesting ones I have found in my digging through them below.

Note: The Mandelbrot Set and Julia sets are mapped onto the real-complex plane (one axis is the real numbers, the other is imaginary numbers), the numbers below the images are the real-complex coordinates of the constant used to generate the image. The first number is the real component; the second is the complex component.


0.1-0.65

0.1-0.84

0.17-0.66

0.2-0.65

0.2-0.81

0.22-0.73

0.23-0.8

0.3-0.67

0.35-0.63

0.37-0.6

0.4-0.59

0.46-0.56

0.46-0.57

0.47-0.55

0.6-0.42

0.66-0.5

0.66-0.7

0.72-0.24

0.72-0.29

0.73-0.18

0.74-0.12

0.75-0.01

0.75-0.02

0.75-0.04

0.75-0.09

0.76-0.06

0.77-0.1

0.8-0.15

0.82-0.18

0.9-0.24

0.93-0.25

0.95-0.01

1.12-0.22

1.14-0.21

1.25-0.01

1.25-0.02

1.25-0.03

1.25-0.05

1.3-0.01

1.3-0.06

1.39-0

1.4-0.01