Version 2 of Tree generator in 25 lines of ActionScript
January 2009 finalists of the 25-Line ActionScript Contest have been announced and sadly my entry is not among them. Therefore, to fulfill my desire of sharing I present you Tree generator 2. And for my fellow coders here is the source. Just a small tip – click on the stage to start a new tree.
This time it is more math than flash – the tree is drawn by generating 3D vectors (with critical parameters of rotationY, rotationZ, length) for branches and changing them accordingly to their age and their parent branch position.

I believe if you could somehow put outlines on the branches, it would look way cooler, otherwise it turns into kind of a blob when it gets big. still cool though. it’s neat how most of the entries take advantage of new flash 10 features
davr
23 Jan 09 at 21:43
I intentionally left this tree in one color – the algorithm does not support z-sorting and having changing shades for the hierarchical levels just looked worse. But there should be some way to make it at least approximate. Could try that out.
But my greatest passion is to make it grow naturally – i will continue experimenting with time and having more fluid lines.
edzis
23 Jan 09 at 22:26
l-systems, l-systems, l-systems
fh
28 Jan 09 at 13:08
Hey, why don’t you examine whonderwhy-er’s entry here: http://www.25lines.com/finalists/0812/037.swf
I think he did a great job, the trees do look really good.
Marius
3 Feb 09 at 18:57