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 This was a big surprise to him and his interest in
the world of These two In 1984 the author hadn't noticed yet that, It took him some time to realize that, opposite to
what happened to the 2-D tree, the 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 --- 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) 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
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: - No matter how deep you draw branches, they never overlap one another.
- If you drew an infinite number of branches, they'd fill the plane (never overlapping).
- All the branches can rotate simultaneously without overlapping*, as can be seen in the pictures below. (Every branch can rotate freely, being the rotation axis its father branch.)
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
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 (B two points that define an axis
and_{x
}, B_{y }, B_{z})
(P the point. _{x }, P_{y }, P_{z}) is the point P
’ after rotating it "a"
radians around the axis.PLet to A:BThen (using 3D vectors): Note the dot and cross
products in this formula are not standard products, but scalar and
vector ones. 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 " You can also read two previous articles about the
subject, one in
The other was published
in the Spanish magazine * **
Last change: 2006-08-07 |