Back in my University days graphics terminals began to appear. They were "dumb" terminals which you passed commands to via a serial interface and not only could you perform the standard VT100 functionality you could also draw vectors and shapes in 16 shades of green! (well it was very exciting at the time :) ). I developed a program that drew trees like the ones that grew in the forest. It used recursive functions, random number distributions of various biases and polynomial equations to map out the branches. It was selected for display at the open house for computer science at Guelph University in 1982. As an "exercise for the student" and nostalgia's sake I resurrected this idea in JAVA.
Send comments to: jsreisch
Draw Trees
This program enables the user to design trees of different types , like you would find in the forest or your dreams. This is accomplished by specifying a set of rules to describe branches at each "iteration" of the tree.
On the tool bar you will notice "draw" button. You may press this to draw a tree. This will draw a default tree. If you press it a second time it will draw a similar but different tree. The tree is different because the default tree has rules to add a certain amount of randomness to the rules to give it an organic feel.
On the tool bar, you will also see an "ITER" text field. This indicates the depth of the tree (number of iterations to draw). You may change this number to draw simpler or more complex trees. Be warned the larger you make this number the longer it will take to draw the tree. I have not incorporated "threads" in this program yet so if you make this number too large you may be waiting longer than is practical.
On the tool bar, you see a "File" menu item. You will see items for opening/saving trees and the rules for drawing them. Saving a "tree" will perform a screen capture of the drawing area so be careful to move the "save" dialog box out of the drawing area or you will capture it as well. Saving "Rules" allows you to come back at a later time and continue a designing session or share your design rules with another user.
Designing trees is accomplished by describing the depth of the tree (iterations) with the "ITER" text field on the toolbar. Each iteration has a given number of branches that can emminate from that node. Each branch has a set of "rules" that are described as an equation.
Below is the toolbar for design rules. The patterned tab on the far left allows you to undock and move the toolbar somewhere else on the screen.
Here is a description of what the different parts of the design toolbar allow you to do.
1) Is a "spinner" textbox that allows you examine and modify the rules for the given tree iteration
2) The "Branches" text field allows you to specifiy how many branches will eminate from this iteration. Typically iteration 1 will have 1 branch (Trunk) and higher iterations will have multiple branches. Final iteration branches (Leaves) may warrant more branches. Note: the more branches you have the more complex the tree will be to draw and the longer it will take.
3) The "Rules" tabs describe rules for drawing branches at the given "Iter"(1).
4) The "Branches" tabs indication which branch for the given "Iter" (1) is being described.
5) Rules descriptions are in the form of an equation. Two types of equations are supported so far "Binomial" and "Cos", and can be selected here for the given "iter", "branch" and "rule".
6) The equation for the given "rule", "branch" and "iter" is given here. Text fields hold coeefficients for the equation. The "Variance" text field describes the range of a guassian random number distribution that the result of the equation may vary. A value of 4 means that the result of the rule's equation may vary plus or minus 2. Note: the equation is described in the Label and the coefficients are labeled.
7) The equation for the given "rule" is mapped in this diagram at an appropriate scale for drawing trees.
8) This copy panel allows you to copy all the rules for this iteration up "^" or down "v" the number of iterations indicated in the text field by pressing the "Copy" button.
9) This copy panel allows you to copy the rule for this "iter" and "branch" to the right ">" branches, left "<" branches, up "^" iterations or down "v" iterations, given in the text field by pressing the "Copy" button.
Release Notes:
Future Features: