Fractals
From GenerativeArt
(Difference between revisions)
(→Fractal or Box Counting dimension: Added content) |
(→Stochastic fractal river: improve pseudocode) |
||
=====Stochastic fractal river===== | =====Stochastic fractal river===== | ||
Both fractals and L-systems can have stochastic (random/chance) forms. | Both fractals and L-systems can have stochastic (random/chance) forms. | ||
- | '''function''' RIVERBEND(x1, y1, x2, y2, res) | + | // Given: |
+ | // res :length of smallest line to be drawn | ||
+ | // DIST(x1, y1, x2, y2) :distance between points (x1, y1) and (x2, y2) | ||
+ | // BEND(x1, y1, x2, y2) :returns x3,y3 randomly between and offset | ||
+ | <br> | ||
+ | '''function''' RIVERBEND(x1, y1, x2, y2, res) | ||
'''if''' DIST(x1, y1, x2, y2) > res | '''if''' DIST(x1, y1, x2, y2) > res | ||
- | + | BEND(x1, y1, x2, y2) | |
- | + | ||
- | + | ||
RIVERBEND(x1, y1, x3, y3) | RIVERBEND(x1, y1, x3, y3) | ||
RIVERBEND(x3, y3, x2, y2) | RIVERBEND(x3, y3, x2, y2) |