A little of history:
The idea of the 2-D static tree came to the mind of the author in around 1967, when he was six. The figure was intriguing to him and he used to sketch it on his school notebooks. Of course with not very precise proportions.
Fifteen years later, in 1982, after having read a mathematical essay in the university's library, the author analyzed it thoroughly and found in awe its fractal properties (if the length of the branches of the same generation decreased following very simple rules the tree would fill the plane! and without two branches ever touching one another!).
This was a big surprise to him and his interest in the world of fractals started to grow. The same year (1982), he asked to himself if a 3-D version of the tree where the branches would reach every point in space without ever overlapping could exist. When he found that this object also existed he was fascinated and appreciated, once more, the beautiful structure of mathematics.
These two static objects, the 2-D tree and 3-D tree, were published in the magazine "Cacumen" in 1984.
In 1984 the author hadn't noticed yet that, in the 2-D tree, every branch could rotate in space independently and freely about its "father branch" and that the branches would never collide one another even if the starting 2-D tree had millions (or infinite) branches. He found that in 1987. That year, after a thrilling lapse of nightly inspiration, the static version of the 2-D fractal tree became a moving fractal.
It took him some time to realize that, opposite to what happened to the 2-D tree, the 3-D tree did not have this moving possibilities because the branches would collide one another.
For years, the moving fractal only moved in the head of the author, the computer program to see the 2-D tree in movement wouldn't come until ten years later. He still needed a key information: in April 1997 he asked in the sci.math Usenet newsgroup what was the mathematical formula to rotate an arbitrary point around an arbitrary axis in 3-D space. Pertti Lounesto's precise answer at the end of this thread on Tue Apr 29 1997 was the key that let us to visualize the tree rotating on the computer's screen that very day.
Look here how to rotate an arbitrary point in space about an arbitrary axis (In Spanish for now).
And here to study how to draw an object in perspective onscreen (also in Spanish for now).
Now, the current old (but with different features) MSDOS version of the program to rotate and visualize the moving fractal tree:
Please note that MSDOS programs may not fully work in modern PCs with default configuration.
It includes the executable and the source code in QuickBasic 4.5.
The source was compiled with the QuickBasic clone: "Power Basic 3.1" to improve its speed.
Download the program here: arbol209.zip (44 KB), decompress the executable, run it and press the space bar to see it in action.
Here is the program main screen:
As you can see, every branch has two sons, four grandsons, eight great-grandsons... and so on.
The tree has several interesting properties:
The only condition for these properties to work is that the length of any branch has to be half of the length of its grandfather branch.
* The program has also a 3-D option that allows you to draw a space filling tree. In 3-D, the branches self-overlap when they rotate, so you couldn't build a physical moving model of it, although you could build a static model. All of the pictures below come from the 2-D tree, from which you can build a model, even a moving model.
To program a tree which rotates you need to know how to rotate an arbitrary point around an arbitrary axis in 3-dimensional space:
Let be (Ax , Ay , Az) and (Bx , By , Bz) two points that define an axis and (Px , Py , Pz) the point. P ’ is the point P after rotating it "a" radians around the axis.
Let n be the unit vector pointing from A to B:
Then (using 3D vectors):
Note the dot and cross
products in this formula are not standard products, but scalar and
From this formulas you can obtain the rotating MSDOS code in the next section:
With this simple piece of code (in QuickBasic, PowerBasic or QBasic), anyone can create, draw and see the tree rotating randomly:
There are other types of rotation that give us curious figures. If you run the MSDOS program (complete, not the portion of code above) and press the key numbers "4" and "6" eight times each, you obtain:
On 1999/04/04 the Golden Ratio (or Divine Proportion) = Phi = (sqr(5) + 1) / 2 was introduced. If you multiply the angle Alfa in the program by Phi in each iteration, you can obtain curving figures like the one below. (This one can't be obtained with the current version of the MSDOS program "arbol209.zip" nor with the Java applet.)
For further information about Moving Fractal Trees, you can read the article "A TUTORIAL AND RECIPE FOR MOVING FRACTAL TREES" in the magazine Computers & Graphics, Vol 22, Number 2 - 3, pp. 301 - 305, 1998.
You can also read two previous articles about the subject, one in "Carrollia"* (Number 53, pp. 10 - 12, Jun 1997).
The other was published in the Spanish magazine "Cacumen"** (Number 15, p. 38, Apr 1984).
** Cacumen was a Spanish magazine of Wit, Playing and Humour that died out in December 1986.
First post in: 1997