Computer Science Canada

Fractal Tree

Author:  arnoct [ Sun May 01, 2005 4:31 pm ]
Post subject:  Fractal Tree

code:
proc fractal (x, y : int, angle, len : real)
    var lengthchange := .75
    if len > 1 then
        var xnew := x + round (len * cosd (angle))
        var ynew := y + round (len * sind (angle))
        drawline (x, y, xnew, ynew, green)
        fractal (xnew, ynew, angle + 45, len * lengthchange)
        fractal (xnew, ynew, angle - 45, len * lengthchange)
    end if
end fractal
fractal(maxx div 2,0,90,100)


Attached the code with comments if you want them.

Author:  zylum [ Sun May 01, 2005 4:55 pm ]
Post subject: 

nice. here's one i did a while back

http://www.compsci.ca/v2/viewtopic.php?t=4137&highlight=fractal

+ 25 bits

Author:  dann_west [ Mon May 02, 2005 2:04 pm ]
Post subject:  Re: Fractal Tree

Pretty trippy!
Keep up the good designs!

Author:  dann_west [ Mon May 02, 2005 2:10 pm ]
Post subject:  Re: Fractal Tree

Interesting.
Could use some sprucing up though.
Twisted Evil

Author:  Delos [ Mon May 02, 2005 6:07 pm ]
Post subject: 

@dann_west
Why on Earth did you double post, 6 minutes apart, when you simply could've editted your last post if you were that intent on adding to it?

@arnoct
Nice work. Suggestion: add lengthchange and fractal colour to your parameters. Just adds a little more customizability to the whole thing...

+ bits


: