Fractals
From GenerativeArt
(Difference between revisions)
* Some mathematical functions define sets of points where the boundry between in-set and out-of-set points exhibit self-similarity across scales. e.g. The Julia set, the Mandelbrot set, and others. | * Some mathematical functions define sets of points where the boundry between in-set and out-of-set points exhibit self-similarity across scales. e.g. The Julia set, the Mandelbrot set, and others. | ||
* In chaotic systems a phase diagram will exhibit fractal behavior about a strange attractor. (To be covered later). | * In chaotic systems a phase diagram will exhibit fractal behavior about a strange attractor. (To be covered later). | ||
+ | |||
+ | Fractals can be defined and generated by recursive functions. | ||
+ | Example: Factorial Function | ||
+ | '''Non-recursive''' | ||
+ | '''function''' FACT(m) | ||
+ | total = 1 | ||
+ | '''for''' n = 1 to m | ||
+ | total = total * m | ||
+ | '''end''' | ||
+ | '''return''' total | ||
+ | |||
+ | '''Recursive''' | ||
+ | '''function''' FACT(m) | ||
+ | '''if''' m > 1 | ||
+ | '''return''' m = m * FACT(m-1) | ||
+ | '''else''' | ||
+ | '''return''' 1 | ||
+ | '''end''' |