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
- variation is the maximum percentage by which lengths and angles can deviate from calculated angle
NB. The tree isn't drawn properly if the beetle hits the edge.
A demonstration of how to use blocks, and an introduction to the idea of binary trees and recursion. In this remix of the original Trees program, a degree of randomness is added to give the tree a more natural appearance.
You can hold down the Shift key and click the green flag to enter "Turbo Mode" - that will make the lattice appear more quickly.
You don't seem to be able to Remix your own projects, but this is derived from my original Trees program: