
-----------------------------------
arnoct
Sun May 01, 2005 4:31 pm

Fractal Tree
-----------------------------------
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.

-----------------------------------
zylum
Sun May 01, 2005 4:55 pm


-----------------------------------
nice. here's one i did a while back 

http://www.compsci.ca/v2/viewtopic.php?t=4137&highlight=fractal

+ 25 bits

-----------------------------------
dann_west
Mon May 02, 2005 2:04 pm

Re: Fractal Tree
-----------------------------------
Pretty trippy!
Keep up the good designs!

-----------------------------------
dann_west
Mon May 02, 2005 2:10 pm

Re: Fractal Tree
-----------------------------------
Interesting.
Could use some sprucing up though.
 :twisted:

-----------------------------------
Delos
Mon May 02, 2005 6:07 pm


-----------------------------------
@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
