On 4D Fractals...

Inspired by the gorgeous Buddhabrot, I’ve been playing with my own fractals. I was curious what would happen to the standard Mandelbrot equation when extended to include hypercomplex numbers. If anyone familiar with this stuff would care to tell me whether this is actually valid math, I’d be grateful. In the meantime, it produces some fairly pretty results, so I’m keeping it :)

Standard 2D Buddhabrot

The 2D Buddhabrot is pretty straightforward to implement. You can get some really nice ghostly effects if you separate the RGB layers and render them with different parameters (right).

There’s also a nice sense of anticipation as repeated iterations continue to refine the image and produce something beautiful out of the random noise. Admittedly this anticipation was lost somewhat when I managed to speed up the program about 1000x from its original speed…

4D renderings

3D slice of a 4D fractal, point rendering

So anyway, replacing the 2 dimensional Mandelbrot’s complex z value with a hypercomplex one gives us a whopping 4 dimensions to play with. I’m then taking a 3D slice of the 4D fractal, and displaying it in OpenGL. First attempt used clouds of GL_POINTS…results were reasonably pretty, but slow as hell. My ‘slice’ is a 3D cube (512×512x512) with over 130 million points to render….needless to say, it’s a little slow.

(It’s really difficult to get an idea of what these look like from a 2D screenshot. I’ll try and get some movies of them rotating if I get chance.)

3D slice of a 4D fractal, texture rendering

So my next attempt used 3D textures. Surprisingly easy to implement, and they’re reasonably fast. However, you lose a lot of the sharpness that the points represention gives you…things are basically constrained by the available memory on my poor Radeon 9700. A color texture 512×512x512 would take up 384MB of texture memory. Texture compression goes some way to alleviating this, but I seem to be maxing out at 256×256x256.

Anyway, the results. The k=0 slice is the most recognisable from its original Mandelbrot source – ignore the diagonal points and you’ve got the standard blob around the centre with its head to the left.

The diagonal spikes have some interesting features using the buddhabrot representation. They have fishbone ‘ribs’ curving out of them. I’ll try and get some better shots of them later – they get lost in the low resolution of the 3D rendering.

I’ll update this page as I go along with some more interesting slices of the 4D space.
I’m getting a little frustrated by hardware limitations…currently thinking of writing my own software renderer for this and running it all in offline mode. We’ll see.

· Jan 12, 01:19 AM ·

  1. nice work! please keep working on this and give us some code to play with :) check out http://www.imagesavant.com/ — Mic Mic    Jan 19, 05:19 PM    #
  2. ^ Dammit, looks like I’ve got some work to do before I get to that sort of image quality. Got any info on those beyond the screenshots? Jonathan del Strother    Jan 21, 12:26 AM    #
  3. I have NO idea what your talking about. But it looks cool. (Nice use of AJAX on the comment dealio) ezKiel    Nov 10, 03:18 AM    #
  4. Hmm… I’ve got a 4-D fractal, but without hypercomplex numbers. And it’s proving interesting. (Z=Z^2+P, that means we have Z’s starting value AND P to use as variables.) I Hope to get some videos of it onto my site with time. (I havn’t a clue about 3D rendering.)
    Keep up the creativity! matthew    Nov 23, 06:39 PM    #
  5. that is realy cool but what are you talking about? — Fred    Dec 16, 01:43 PM    #
  6. Awesome job. Would definately be neat to see video. — Forrest    Jan 9, 07:58 AM    #
  7. really nice work here. i remember doing some computer plots of complex curves mapped from 4d to 3d and loved the results. keep it up.

    Tristan Perich    May 29, 11:07 AM    #

Commenting is closed for this article.