How to Use Color Stealing

This method for coloring a fractal is based on the idea of "color stealing" described by Michael Barnsley. It is based on choosing a colorful input image and a coloring ifs with the same number of functions as the drawing IFS being used to generate the fractal. The drawing IFS and coloring IFS are run in sync. Each time a random function from the drawing IFS is chosen to plot the next point in that iteration, the corresponding function in the coloring IFS is used to plot the next point for that IFS. The coloring IFS is drawn on top of the input image. The point computed for the drawing IFS is plotted with the same color as the point determined by the coloring IFS. The drawing IFS "steals" the color from the image underneath the coloring IFS. The fractal image below is the Heighway dragon colored based on the image of fall leaves using the Twin Dragon as the coloring IFS.
  1. Select "Set Color Stealing Options" from the Code/IFS Color Scheme menu
  2. The default image shows fall leaves. You can change this by saving an image file with the name "default" and extension "gif", "jpg", "png", or "bmp" in the same folder as the IFS Construction Kit program. If the program detects such a file (search for extensions in that order), it will use that the first time the dialog box is loaded. You can load a new input image at any time by clicking on the file button in the color stealing options window and loading a new file. You can also paste an image from the clipboard into the color stealing options window. If you want to keep that image, click on the save button at the top of the dialog box to save the image to a file, or click with the right button on the image to bring up a contextual menu to copy the image to the clipboard or save to a file.
  3. The options window will show all the possible coloring IFS's with the same number of functions as the current drawing IFS. The default coloring IFS is one that fills a unit square using the same number of rectangles as the number of functions in the drawing IFS, and with the areas of the rectangles equal to the probabilities used for the drawing IFS. The input image is scaled so that the unit square covers the entire image, thus exploiting all the colors available in the image. This choice of "Unit Square" will always be the first one listed in the options window. You can also select another IFS from the list. If necessary, you can refresh the list by clicking on the refresh button. This may need to be done if you make any changes to the current drawing IFS. Only IFS's from the Fractals list with the same number of functions will be displayed, as well as the current IFS in the IFS window if any changes have been made.
  4. If you want to see what points are being used by the coloring IFS and where they fall on the input image, check the box "Show Points". You can click on the colored square to change the color of the plotted points. This has no effect on the colors used to plot the drawing IFS fractal. By default the coloring IFS will be scaled to use as much of the input image as possible.

    If you want the coloring IFS to be drawn so that the horizontal and vertical scales are the same, check the box "Equal Scale". This may change the colors used to plot the drawing IFS. Compare the image below with the first fractal drawn above.
  5. You can also choose "Show Points" when using Trace in the fractal window with the drawing IFS. The corresponding points will be traced on the input image according to the coloring IFS. The coloring IFS will start with the point (0,0) by default, or you can crtl click with the right mouse button in the input image window to set the initial point for the coloring IFS.
  6. Clicking the left pointing arrow button will hide the sidebar in the Coloring Stealing Image dialog. Clicking the button again (it will now be pointing to the right) will restore the sidebar.
  7. You can resize the dialog box as needed and the image will be redrawn to fit the new size.
  8. The color stealing works better if the probabilities are comparable for the corresponding functions in the drawing IFS and the coloring IFS. If these probabilities are very different, then you can use the "Swap Transformations" dialog box in the Design menu to switch the order of the functions in the drawing IFS to try to make them comparable to those in the coloring IFS.
  9. You can close the Color Stealing Image dialog and still use the color stealing scheme for the drawing IFS as long as "Use Color Stealing" remains checked under the Code/IFS Color Scheme menu. If you select another drawing IFS while the dialog is closed, the Unit Square will be used as the coloring IFS.
Here the same fractal fern is drawn using two different input images. The coloring IFS is the Unit Square for the first and the same as the drawing IFS for the second.

References

  1. Michael Barnsley, "Ergodic Theory, Fractal Tops and Colour Stealing", available at http://wwwmaths.anu.edu.au/~barnsley/pdfs/fractal_tops.pdf
  2. Michael Barnsley, "Fractal Transformations", available at http://maths-people.anu.edu.au/~barnsley/pdfs/nigel4.pdf
  3. Michael Barnsley, SuperFractals, Cambridge University Press, 2006