
-----------------------------------
zylum
Sun Mar 14, 2004 12:14 am

[source] fractal tree
-----------------------------------
here's a simple example of a fractal tree....

setscreen ("graphics:500;600")
proc fractal (x, y, depth, maxDepth, angle, maxLength : int)
    var endx, endy, ang : int
    for i : 1 .. depth
        ang := angle + Rand.Int (-15 * depth, 15 * depth)
        endx := round (cosd (ang) * maxLength) + x
        endy := round (sind (ang) * maxLength) + y
        Draw.ThickLine (x, y, endx, endy, (maxDepth - depth + 1) * 2, 115)
        %delay (10)
        if depth 