Mandelbrot Magic

Architecture

Key Technical Issues

  1. What technology should be used to store an image file?
  2. What technology should be used to create an animation?
  3. What technology should be used to view an animation?

The Architectural Implications

As far as possible, I want to use standard Java technology. With respect to the questions above, I want to use the Java Media Framework.

What technology should be used to store an image file?

My solution is based on the Java tutorial: Working with Images. There is a issue concerning whether the file format for image uses lossy or lossless data compression. PNG is lossless; JPEG is lossy. The latter presumably uses fewer bits. If we store the model from which the image is produced, the orignial image could be reconstructed losslessly from the model. For the purposes of creating an animation, a lossy image therefore suffices, provided that loss of image fidelity is imperceptible. For the moment, I am storing the image as a PNG file, on the grounds that no format should display better than PNG, although it may be that, for these images, the difference between PNG and JPEG is imperceptible to the human eye.

What technology should be used to create an animation?

I looked on the web for ways to use Java to create an MPEG file from a sequence of JPEG files. Although there appears to be an API for doing it, it looks like there is no open-source code or library for creating an MPEG from JPEG files. I found Java code that, starting from a list of compressed JPEG image files, generates a video-only QuickTime movie of the still images. This software however requires platform-specific libraries. Quicktime Pro can produce a .mov file from a sequence of PNG files. This is what I am doing for now. It remains to be seen if it can handle reasonably sized images at 15 frames/sec.

It remains to be seen how to synchronize this video with the playing of a sound file.

What technology should be used to view an animation?

The answer to the question of creating an animation appears to imply a unique answer to the issue of viewing one: Quicktime Pro will be used to display the animation. Since it works for Windows, the MacIntosh OS, and Linux (and possibly others), it is sufficiently cross-platform for this project at this time.

Color maps

Use HSB instead of RGB.

Use renormalized iteration count.