/TreeModel

2017暑期实习——树木编辑器(可选择枝干)

Primary LanguageJavaScript

The right column is the edit box for the main branch, including:

Background:Background color of the scene

Show wireframe:Displaying the outline of the tree model but not including the bark, it is convenient to directly observe the ring sequence.

MainBranch: 3 types of main branches.

Branch:3 types of sub-branches.

Build:Rebuild a tree.

Undo: Undo

Redo: Redo

By clicking the option in the edit bar, you can select the main branch type and sub-branch type of the tree you want to construct. The main branch can only choose one type, and the sub-branches can be selected multiple. After selecting, click 'build' to generate randomly a tree.

The structure of each tree begins with the main branches, and then the sub-branches are randomly added at a certain height of the main branches, and then the leaves are randomly added within a certain height range of each branch. Then draw the whole tree onto the screen.

The hierarchy of trees is obtained randomly.