Creating a Tree With IfsCompose

By Owen Taylor <otaylor@gtk.org>

First some preliminaries. In the following tutorial you will be instructed to "Move", "Rotate/Scale" and "Stretch" transformations. To do this, select the appropriate operation using one of:
  1. The buttons beneath the design area.
  2. The menu brought up by clicking the right mouse button in the design area.
  3. The keyboard shortcuts (M/R/S).
Then click on the transformation you want to adjust and drag to perform the operation.
First, create a new 256x256 or other square image, and add a transparent layer. Then set your foreground color to a medium green (this is a convenience thing - the current foreground color is the default color for new transformations in IfsCompose). Start IfsCompose. If you've created a previous image during this GIMP session, click on "Defaults".
Now move the middle triangle in the design area towards the top, and rotate the two top triangles to the outside. This gives us an approximation to the crown of a tree.
Change GIMP's foreground color to a dark brown. In IfsCompose, click on "New" to create a new transformation. Click on the new transformation to select it, go to the "Color Transformation" page of the notebook, and move the two sliders ("Scale Hue By" and "Scale Value By") all the way to the left. This tells IfsCompose not to blend the colors for this transformation. Now move the new transform down to the bottom of the area, stretch it to about 2.5 times its original height (with "Stretch" selected, click on it and drag vertically), then scale it back to its original height. (It's now thinner).
Repeat the above step twice more. We now have all the component transforms of our tree.
Assembling the trunk is the trickiest step - the trunk of a tree isn't very fractal so we'll have to be satisfied with something less than perfection. Pick one of the brown transforms (The widest one will work best), rotate it 180 degrees, and move it so the main blob just touches the bottom center of the window. Now move one of the other transformations so its blob is immediately above the first one. (Don't rotate this one). Do the same with the step with the third trunk segment. At this point, you may want to jiggle them around some until you get a reasonably solid trunk, but don't spend too much effort on this - as I said, perfection isn't possible. (You can always touch it up with a drawing tool later).
Assembling the crown: Rotate/scale and move the top three transformations until the stems just touch the trunk. Also, at this stage, select each of the three transforms in the crown and change its color slightly. (Click on the button in the top line under "Color Transformation" to bring up a color selector.) Make the outer parts of the crown a lighter green than the inner parts.
The basic tree is now complete. Click on "OK" to render it and return to the GIMP. If you're not satisfied, you can return to IfsCompose tweak the transforms some, and try again - but remember, perfection isn't possible here and often the first try looks best.
We'll now add some flowers. Create a new transparent layer. Return to IfsCompose. Delete the trunk. (Click on each transform and select "Delete"). Now select each of the parts of the crown and change it's color to a different shade of pink or white. Type Control-A to select all the transforms and expand them just slightly using "Rotate/Scale". Bring up the "Render Options" dialog box, and reduce the radius to about 0.3. Reduce the number of iterations to about 1/10th of its original value. Click OK to render the flowers.
If the flowers don't line up well, you can return to IfsCompose adjust them and try again. Otherwise, we're now done with the fractal.
Some final touches: Crop the image if necessary. In the layers dialog box, select the background layer. Select a dark blue as your background color and a light blue as your foreground color. Select the gradient tool, and drag from the top to the bottom of the image, to make a sky-like background. If you desired, you could do some hand touch-up on the trunk here.

Return to the main IfsCompose page