Fractal Tree Program

These are some pictures from a fractal tree program I wrote. The program is available here: Tree drawing script

There are three important variables to consider: 1. beginning length: This is the length of the first leg (the trunk) of the tree. It's in pixels, but I resize the image (to antialias it), so it's 16 times as long as it will be in the final image.

2. denominator. This is probably the most important one. It's a recursive function: Every time it splits into a new branch, it makes the new branch a little bit smaller. This function decides how much smaller it will be. IF you want the next branch to be half the size of the first one, use 2. If you want it to be three quarters as big, use 1.333, etc.

3. The angle split. This is the angle between the two new branches, if you want the branches to be at right angles, pick 90, etc.

OK, so here are some pictures I was able to make by shuffling around the variables:

First fractal tree

This is the first one I made. It's really conservative -- I made the denominator fairly large, to make sure that the branches wouldn't run over each other.

Second fractal tree

After a little messing around, I was able to make this one. As you can see, it has many more branches. It gave me an idea.

Third fractal tree

As you can see, this one has even more branches. The angle is 180 degrees, and the denominator is as small as I could make it and not have the branches run into each other.

Fourth fractal tree

With this one, I was just messing around with the angles. This one is 120 degrees, so it makes something resembling a honeycomb.

Fifth fractal tree

This one is just intended to be as aesthetically pleasing as possible. I forget the angle exactly, but it's somewhere around 60 degrees.

So there you have it! This is my fractal tree program.