# Fractal Algorithm's

There is, probably, an unlimited amount of fractal algorithm's. A few of them are incorparated in FracHunt. It is not possible to add your own formula's to FracHunt. However if you have this great formula I am eager to include it in a future version of FracHunt.

The following chapters will explain the algorithm's contained in FracHunt.

All the algorithm's in FracHunt iterate a formula until a maximum number of iterations is exceeded or the resulting vector exceeds a minimum or maximum value in which case a certain fixed color is used . When a minimum or maximum value is exceeded a certain color is selected depending on the number ot iterations and the coloring algorithm.

In the following chapters Z depicts a complex number.

The mandelbrot set is calculated by the following formula:

**
Z**_{n+1} = Z_{n}^{2} + Z
## Julia set

The julia set is calculated by the following formula:

**
Z**_{n+1} = Z_{n}^{2} + C
If you compare this formula with the mandelbrot formula you will note that for the point where C equals Z the julia set is the same as the mandelbrot set. Therefore you could imagine a point in the mandelbrot set as an index into a julia set.

The mandelbrot set is calculated by the following formula:

**
Z**_{n+1} = Z_{n}^{3} + Z
## Julia set^{3}

The julia set^{3} is calculated by the following formula:

**
Z**_{n+1} = Z_{n}^{3} + C
Of course for the point where C equals Z the julia set is the same as the mandelbrot set^{3}. Therefore you could see a point in the mandelbrot set^{3} as an index into a julia set^{3}.

Just a formula I saw on the web somewhere. It is not the greatest but it gives you something different to render than mandelbrot and julia sets.

**
Z**_{n+1} = CZ( 1 - Z_{n} )
## Newton Raphson X^{3}

Newton Raphson is a method used in numerical analysis to find the root of a formula. So we are trying to find the complex
value for which a formula evaluates to zero. In FracHunt we actually try to find the point for which the following condition is met:

**
Z**^{3} - C = 0
We do this by iterating the formula

**
Z**_{n+1} = Z_{n} - ( Z - C )^{3} / ( 3 ( Z - C )^{2} )
## Sin Z

This formula just takes the sine from a point in the complex plain.

**
Z**_{n+1} = C sin( Z_{n} )
## Newton Raphson -X^{3} + 9 X ^{2} - 18X + C

Newton Raphson is a method used in numerical analysis to find the root of a formula. So we are trying to find the complex
value for which a formula evaluates to zero. In FracHunt we actually try to find the point for which the following condition is met:

**
Z**^{3} - C = 0
We do this by iterating the formula

**
Z**_{n+1} = Z_{n} - ( -X^{3} + 9X^{2} - 18X + C ) / ( -3 X^{2} + 18X - 18 )