by virnuls
See inside

Click the flag and watch the squirrel draw a tree. Change the values of the four variables and see what effect it has on the shape of the tree:
- leafsize is the size of the leaves (i.e. the minimum line length)
- length is the length of the trunk
- length_factor is the factor by which the lengths of the branches are increased - e.g. if set to 0.5, then each branch is half the length of its parent
- angle is the angle between the branches
- angle_factor is the factor by which the angle increases at each junction - i.e. a value of 1 makes the angle the same at each junction
NB. The tree isn't drawn properly if the beetle hits the edge.

Notes and Credits

A demonstration of how to use blocks, and an introduction to the idea of binary trees and recursion.

You can hold down the Shift key and click the green flag to enter "Turbo Mode" - that will make the tree appear more quickly.

You don't appear to be able to remix your own projects, so I've created another version called Natural Trees here:

Shared: 18 Jun 2013 Modified: 22 Feb 2016
Favorite this project 12
Love this project 18
Total views 1639
View the remix tree  3
More projects by virnuls