Fractal flame

Last updated
A fractal flame created by the Electric Sheep computing project. Electricsheep-14156.jpg
A fractal flame created by the Electric Sheep computing project.
Fractal flame created in Apophysis. Swirly belt444.jpg
Fractal flame created in Apophysis.

Fractal flames are a member of the iterated function system class [1] of fractals created by Scott Draves in 1992. [2] Draves' open-source code was later ported into Adobe After Effects graphics software [3] and translated into the Apophysis fractal flame editor. [2]

Contents

Fractal flames differ from ordinary iterated function systems in three ways:

The tone mapping and coloring are designed to display as much of the detail of the fractal as possible, which generally results in a more aesthetically pleasing image.

Algorithm

The algorithm consists of two steps: creating a histogram and then rendering the histogram.

Creating the histogram

A fractal flame. Apophysis-100303-104.jpg
A fractal flame.

First, one iterates a set of functions, starting from a randomly chosen point P = (P.x,P.y,P.c), where the third coordinate indicates the current color of the point.

Set of flame functions:

In each iteration, choose one of the functions above where the probability that Fj is chosen is pj. Then one computes the next iteration of P by applying Fj on (P.x,P.y).

Each individual function has the following form:

where the parameter wk is called the weight of the variationVk. Draves suggests [4] that all :s are non-negative and sum to one, but implementations such as Apophysis do not impose that restriction.

The functions Vk are a set of predefined functions. A few examples [4] are

The color P.c of the point is blended with the color associated with the latest applied function Fj:

P.c := (P.c + (Fj)color) / 2

After each iteration, one updates the histogram at the point corresponding to (P.x,P.y). This is done as follows:

histogram[x][y][FREQUENCY]:=histogram[x][y][FREQUENCY]+1histogram[x][y][COLOR]:=(histogram[x][y][COLOR]+P.c)/2

The colors in the image will therefore reflect what functions were used to get to that part of the image.

Rendering an image

To increase the quality of the image, one can use supersampling to decrease the noise. This involves creating a histogram larger than the image so each pixel has multiple data points to pull from. For example, create a histogram with 300×300 cells in order to draw a 100×100 px image; each pixel would use a 3×3 group of histogram buckets to calculate its value.

For each pixel (x,y) in the final image, do the following computations:

frequency_avg[x][y]:=average_of_histogram_cells_frequency(x,y);color_avg[x][y]:=average_of_histogram_cells_color(x,y);alpha[x][y]:=log(frequency_avg[x][y])/log(frequency_max);//frequency_max is the maximal number of iterations that hit a cell in the histogram.final_pixel_color[x][y]:=color_avg[x][y]*alpha[x][y]^(1/gamma);//gamma is a value greater than 1.

The algorithm above uses gamma correction to make the colors appear brighter. This is implemented in for example the Apophysis software.

To increase the quality even more, one can use gamma correction on each individual color channel, but this is a very heavy computation, since the log function is slow.

A simplified algorithm would be to let the brightness be linearly dependent on the frequency:

final_pixel_color[x][y]:=color_avg[x][y]*frequency_avg[x][y]/frequency_max;

but this would make some parts of the fractal lose detail, which is undesirable. [4]

Density Estimation

The flame algorithm is like a Monte Carlo simulation, with the flame quality directly proportional to the number of iterations of the simulation. The noise that results from this stochastic sampling can be reduced by blurring the image, to get a smoother result in less time. One does not however want to lose resolution in the parts of the image that receive many samples and so have little noise.

This problem can be solved with adaptive density estimation to increase image quality while keeping render times to a minimum. FLAM3 uses a simplification of the methods presented in *Adaptive Filtering for Progressive Monte Carlo Image Rendering*, a paper presented at WSCG 2000 by Frank Suykens and Yves D. Willems. The idea is to vary the width of the filter inversely proportional to the number of samples available.

As a result, areas with few samples and high noise become blurred and smoothed, but areas with many samples and low noise are left unaffected. [5]

Not all Flame implementations use density estimation.

See also

Related Research Articles

<span class="mw-page-title-main">Mandelbrot set</span> Fractal named after mathematician Benoit Mandelbrot

The Mandelbrot set is a two-dimensional set with a relatively simple definition that exhibits great complexity, especially as it is magnified. It is popular for its aesthetic appeal and fractal structures. The set is defined in the complex plane as the complex numbers for which the function does not diverge to infinity when iterated starting at , i.e., for which the sequence , , etc., remains bounded in absolute value.

In digital signal processing, spatial anti-aliasing is a technique for minimizing the distortion artifacts (aliasing) when representing a high-resolution image at a lower resolution. Anti-aliasing is used in digital photography, computer graphics, digital audio, and many other applications.

In mathematics, a Gaussian function, often simply referred to as a Gaussian, is a function of the base form

<span class="mw-page-title-main">Canny edge detector</span> Image edge detection algorithm

The Canny edge detector is an edge detection operator that uses a multi-stage algorithm to detect a wide range of edges in images. It was developed by John F. Canny in 1986. Canny also produced a computational theory of edge detection explaining why the technique works.

<span class="mw-page-title-main">Iterated function system</span>

In mathematics, iterated function systems (IFSs) are a method of constructing fractals; the resulting fractals are often self-similar. IFS fractals are more related to set theory than fractal geometry. They were introduced in 1981.

<span class="mw-page-title-main">Image segmentation</span> Partitioning a digital image into segments

In digital image processing and computer vision, image segmentation is the process of partitioning a digital image into multiple image segments, also known as image regions or image objects. The goal of segmentation is to simplify and/or change the representation of an image into something that is more meaningful and easier to analyze. Image segmentation is typically used to locate objects and boundaries in images. More precisely, image segmentation is the process of assigning a label to every pixel in an image such that pixels with the same label share certain characteristics.

<span class="mw-page-title-main">Pickover stalk</span> Inherent structure of the mandelbrot set

Pickover stalks are certain kinds of details to be found empirically in the Mandelbrot set, in the study of fractal geometry. They are so named after the researcher Clifford Pickover, whose "epsilon cross" method was instrumental in their discovery. An "epsilon cross" is a cross-shaped orbit trap.

<span class="mw-page-title-main">Thresholding (image processing)</span> Image segmentation algorithm

In digital image processing, thresholding is the simplest method of segmenting images. From a grayscale image, thresholding can be used to create binary images.

<span class="mw-page-title-main">Apophysis (software)</span> Open Source fractal editor and generator

Apophysis is an open source fractal flame editor and renderer for Microsoft Windows and Macintosh.

The following are common definitions related to the machine vision field.

<span class="mw-page-title-main">Histogram equalization</span> Method in image processing of contrast adjustment using the images histogram

Histogram equalization is a method in image processing of contrast adjustment using the image's histogram.

<span class="mw-page-title-main">Plasma effect</span>

The plasma effect is a computer-based visual effect animated in real-time. It uses cycles of changing colours warped in various ways to give an illusion of liquid, organic movement.

Mean shift is a non-parametric feature-space mathematical analysis technique for locating the maxima of a density function, a so-called mode-seeking algorithm. Application domains include cluster analysis in computer vision and image processing.

Compressed sensing is a signal processing technique for efficiently acquiring and reconstructing a signal, by finding solutions to underdetermined linear systems. This is based on the principle that, through optimization, the sparsity of a signal can be exploited to recover it from far fewer samples than required by the Nyquist–Shannon sampling theorem. There are two conditions under which recovery is possible. The first one is sparsity, which requires the signal to be sparse in some domain. The second one is incoherence, which is applied through the isometric property, which is sufficient for sparse signals. Compressed sensing has applications in, for example, MRI where the incoherence condition is typically satisfied.

<span class="mw-page-title-main">Fractal-generating software</span>

Fractal-generating software is any type of graphics software that generates images of fractals. There are many fractal generating programs available, both free and commercial. Mobile apps are available to play or tinker with fractals. Some programmers create fractal software for themselves because of the novelty and because of the challenge in understanding the related mathematics. The generation of fractals has led to some very large problems for pure mathematics.

<span class="mw-page-title-main">Histogram matching</span>

In image processing, histogram matching or histogram specification is the transformation of an image so that its histogram matches a specified histogram. The well-known histogram equalization method is a special case in which the specified histogram is uniformly distributed.

Color normalization is a topic in computer vision concerned with artificial color vision and object recognition. In general, the distribution of color values in an image depends on the illumination, which may vary depending on lighting conditions, cameras, and other factors. Color normalization allows for object recognition techniques based on color to compensate for these variations.

<span class="mw-page-title-main">Chaotica (software)</span>

Chaotica is a commercial fractal art editor and renderer extending flam3 and Apophysis's functionality. There is also a free version with limited render resolution and animation length.

In image Noise reduction, local pixel grouping is the algorithm to remove noise from images using principal component analysis (PCA).

<span class="mw-page-title-main">Plotting algorithms for the Mandelbrot set</span> Algorithms and methods of plotting the Mandelbrot set on a computing device

There are many programs and algorithms used to plot the Mandelbrot set and other fractals, some of which are described in fractal-generating software. These programs use a variety of algorithms to determine the color of individual pixels efficiently.

References

  1. Mitchell Whitelaw (2004). Metacreation: Art and Artificial Life. MIT Press. pp 155.
  2. 1 2 "Information about Apophysis software". Archived from the original on 2008-09-13. Retrieved 2008-03-11.
  3. Chris Gehman and Steve Reinke (2005). The Sharpest Point: Animation at the End of Cinema. YYZ Books. pp 269.
  4. 1 2 3 "The Fractal Flame Algorithm" (PDF). (22.5 MB)
  5. See https://github.com/scottdraves/flam3/wiki/Density-Estimation.