Jump to page content

Flying into a fractal

Update (3rd January 2007)

I recommended this project as a good Cy/VOS demonstration program, and Jeni remembered that such a program already exists: XaoS, available for various operating systems. XaoS far exceeds anything written on this page, because it is both interactive and autopilot driven and has very many goodies.

This page has been up since the 4th of July 2004 and, while it’s received a fair few downloads and views, it has not attracted a single comment from anyone (as is typical of this site). As such, this page is considered deprecated in favour of XaoS, which beat me to it, dating back to 1996.

A demonstration and a challenge

Some years ago now, I had the idea of creating a video clip of flying into a fractal, exploring the endless depths of its mathematical beauty. WinFract on the PC lets you closely control zooming into a fractal, and I used this mechanism to collect what amounted to 139 frames of increasing magnification. After that, I must have abandoned the project, and the files remained on my PC for the years to come.

An e-mail conversation brought the project back to mind again, and I went and dug up all the files. PhAtfiSh was able to combine all the frames into a video clip, which is now available for download. The 139 frames I took, at 7 frames per second, come to just over 19 seconds of animation. The video clip is therefore just a proof of concept – a teaser if you like – of the idea of demonstrating zooming into a fractal.

A challenge

One day, I may complete the task, although I find this unlikely, especially given the number of frames involved that would need to be manually generated! John Whitehouse demonstrates on his site animations similar to mine where the frames were created using his Python fractal generation code. While such animations lack some of the gracefulness of mine, as a concept it provides a good starting point for an automation of the process of a fully-fledged animation along the lines of mine.

The next logical step is to find a programmatic way to recreate the flight path into the fractal as seen in my video. The beauty of my own work (conceptually at least!) is that the viewer flies down into the fractal along a smooth trajectory; this was originally done by hand by nudging the zoom rectangle for each succeeding frame, and I did not make much of an effort if any to achieve a curved path. In the case of an automated process, the zoom centre co-ordinates for each frame can be calculated automatically. In my animation, I tended the zoom towards interesting areas of the fractal that warranted closer inspection one frame at a time, but if you are going to automate frame generation then you only need to set a few key frames as goals for the process. JW’s code has features for finding and centering on “points of interest” in the fractals by itself, but in the interests of better human judgement one may wish to choose such points manually.

Zoom path passing through points of interest in key frames

The challenge is to find a way to generate a smooth flight through the fractal through a series of key frames which focus on interesting areas in the fractal along the journey. Given a sequence of known spatial co-ordinates (x, y, t) where x and y are the co-ordinates of the zoom focal point and t is the time in frames from the start, an algorithm could be used to generate a curved path linking all the points in a smooth path; an illustration is provided of this path for clarity. Next, co-ordinates along this path would be passed into a fractal generator such as JW’s to create all the intermediate frames. Some consideration would be needed as to how to generate the initial sequence of key frames used to generate the curve, and how to then pick the various values used for making the intermediate frames.

Finally, the frames need to be stitched together to form a video clip. I have no idea about the best format or codec for this; the best that PhAtfiSh and I could find was CinePak. Animated GIFs are a little on the large side, I think, but are a workable alternative.

I would be interested to see attempts to create such a movie, and any good submissions I receive will be posted here. I look forward to observing what you folks can create. There is the potential to create not only video clips here (of various fractal types), but Flash movies, software, and with the aid of image manipulation tools to post-process the frames, some very interesting effects.


So far, you can download my own fractal zoom demonstration, as both a video clip, and as individual frames for anyone wishing to simply experiment with formats and codecs.