Fractals
From GenerativeArt
(Difference between revisions)
- | |||
- | |||
Fractals are structures that exhibit self-similarity at all scales. Such self-similarity may be: | Fractals are structures that exhibit self-similarity at all scales. Such self-similarity may be: | ||
Fractals can be defined and generated by recursive functions. | Fractals can be defined and generated by recursive functions. | ||
Example: Factorial Function | Example: Factorial Function | ||
- | '''Non-recursive''' | + | ====='''Non-recursive'''===== |
'''function''' FACT(m) | '''function''' FACT(m) | ||
total = 1 | total = 1 | ||
'''return''' total | '''return''' total | ||
- | '''Recursive''' | + | ====='''Recursive'''===== |
'''function''' FACT(m) | '''function''' FACT(m) | ||
'''if''' m > 1 | '''if''' m > 1 |