As you may already be aware if you follow the DYMT:R thread, I've been playing around with fractals again.

The latest geeky diversion is figuring out how to create animated fractal zoom videos. You can check out the first attempt here: http://youtu.be/ceeW4nIw0D4

It's a 90-second "deep zoom" (12 orders of magnitude) into the Mandelbrot set at (-7.540838721493303e-01 + 4.981851110224700e-02i). To give some sense of scale, this is roughly equivalent (plus or minus an order of magnitude) to magnifying an individual atom to the size of your screen.

The video is rather low-res (only 480p), and has some aliasing/noise effects and video compression artifacts (grumble, grumble), but I think it shows promise.

Everything was done using home grown fractal rendering software (written in Python and C), and Open Source video encoding tools, running on Ubuntu Linux.

I may need to re-purpose some spare PC hardware into a fractal rendering farm so I can do this stuff in high-def. I've got a couple of Phenom II 1090Ts and an X4 980 that I could press into service; with my main desktop's FX-8320 in the mix that's 24 reasonably capable cores I should be able to throw at this. I think that should get the render times down to something tolerable.

So... any other math/fractal/graphics geeks out there who are into this stuff?

The years just pass like trains. I wave, but they don't slow down.-- Steven Wilson

Last night I figured out how to re-use data from one frame to drastically speed up rendering of the next. This makes rendering the fractal videos at higher resolutions practical, even on a run-of-the-mill desktop system. It still isn't exactly fast, but it "only" takes hours or days (instead of days or weeks).

The dirty details: Black areas of the image (points in the interior of the Mandelbrot set) are expensive to compute, especially at high zooms; this is because you need to iterate all the way up to the limit to determine whether a point is a member of the set, and the limit must be increased to insanely high values (half a million or so) as the zoom level rises to maintain image quality and avoid spurious "black holes". The trick is that when rendering a series of frames for a smooth zoom, successive images are very similar to each other. So you can use pixel data from the previous frame to decide which pixels of the new frame can't possibly lie outside the set, and skip the calculation for those points (just color them black without bothering to iterate).

I also want to come up with methods for scripting more complicated zoom/pan movements, to create virtual tours around the set instead of simple deep zooms into a single point.

The years just pass like trains. I wave, but they don't slow down.-- Steven Wilson

ludi wrote:Whoa. Not only was that impressive, but after the video ended, I got a reverse-motion illusion (all the elements of the YouTube page layout were continuously receding) for several seconds afterward.

The zoom rate is a bit higher on that one (same total zoom, but over a 60 second period instead of 90). I think this may accentuate the motion illusion effect.

ludi wrote:Whoa. Not only was that impressive, but after the video ended, I got a reverse-motion illusion (all the elements of the YouTube page layout were continuously receding) for several seconds afterward.

The zoom rate is a bit higher on that one (same total zoom, but over a 60 second period instead of 90). I think this may accentuate the motion illusion effect.

Same thing just happened to me. Cool.

JBI, looking forward to your final documented code. Nice work on the videos so far.

http://youtu.be/8An2NoEw-2M (Make sure your player is set to 720p HD for best clarity, assuming your connection has sufficient bandwidth!)

Another "straight zoom" vid. I'd really like to work on the more elaborately scripted "fractal tour" stuff (and maybe even create some original music to accompany them), but don't see myself having time until mid-March. For now, this sort of thing will have to do, since the code's already written, and I can just set up a destination point and let it render overnight.

This one is a zoom into the "double spiral" (left) side of the valley between the main cardioid and the largest circular feature of the Mandelbrot set, at coordinates 7.534266571159055e-01, 5.181353020385396e-02i.

A nice illustration of "feature doubling" as we zoom in to a "mini-brot" at a magnification of 2e+12. Watch as the number of arms coming out of the vortex we're zooming into starts at 2 around the 0:57 mark, and repeatedly doubles at 1:12, 1:20, 1:26, and 1:28 (additional doublings, to 64 and 128 arms are also visible at the final magnification).

The years just pass like trains. I wave, but they don't slow down.-- Steven Wilson

just brew it! wrote:http://youtu.be/8An2NoEw-2M (Make sure your player is set to 720p HD for best clarity, assuming your connection has sufficient bandwidth!)

Another "straight zoom" vid. I'd really like to work on the more elaborately scripted "fractal tour" stuff (and maybe even create some original music to accompany them), but don't see myself having time until mid-March. For now, this sort of thing will have to do, since the code's already written, and I can just set up a destination point and let it render overnight.

This one is a zoom into the "double spiral" (left) side of the valley between the main cardioid and the largest circular feature of the Mandelbrot set, at coordinates 7.534266571159055e-01, 5.181353020385396e-02i.

A nice illustration of "feature doubling" as we zoom in to a "mini-brot" at a magnification of 2e+12. Watch as the number of arms coming out of the vortex we're zooming into starts at 2 around the 0:57 mark, and repeatedly doubles at 1:12, 1:20, 1:26, and 1:28 (additional doublings, to 64 and 128 arms are also visible at the final magnification).

Beautiful! I'm always a sucker for fractals. Is your code generic enough to handle different sets like the Julia & Fatou sets without too much trouble?

AMM wrote:It should be highly parallelizable right? Is your current implementation threaded?

Yes! Automatically uses as many cores as you've got (up to 32, IIRC). Chunks up the image being rendered into 50x50 pixel blocks, and hands those off to worker threads running on each core. Tested it on a 12-core server at work and it scales very well.

chuckula wrote:Beautiful! I'm always a sucker for fractals. Is your code generic enough to handle different sets like the Julia & Fatou sets without too much trouble?

Yup. The interactive version of it allows you to click on a point in the Mandelbrot set and displays the corresponding Julia set in a second window. After next weekend I will have more time to work on the code again; want to do some Julia set morphing videos (animation of how the Julia set changes as the associated point in Mandelbrot-space moves).

Also need to do some regression testing to make sure the Windows version still works before releasing the code "into the wild", since all of my recent futzing around has been done under Linux.

The years just pass like trains. I wave, but they don't slow down.-- Steven Wilson

Well, it's not like I tend to run bleeding edge GPUs (since I don't game). So although I've got a couple of reasonably recent discrete GPUs (one each ATI and nVidia) at my disposal, they are quite low-end.

The years just pass like trains. I wave, but they don't slow down.-- Steven Wilson

Wow... oldschool I have not done Fractal work since a coop I did 20 years ago (the PC they gave me was not up to handling them rendering at a decent rate).I worked with Mandelbrot and Julia sets at the time.