Willow Tree

Description

A willow tree growing simulation using Toxiclibs library. Initially, a root node (generation 0) and then its child nodes (generation 1) are created. At each time, each child node moves toward a random target for certain periods and then stops moving. A branch is created, which is a spring between the root node and a child node. As the child node moves, the branch and therefore tree grow.

When a child node stops moving, it creates its own child (generation 2) or peer nodes (generation 1). (Generation 6 is the last generation in this model.) A branch between a node and its peer node is thicker than that between the node and its child node. Nodes of generation 4 or higher are under gravity force and therefore move downward. As a result, branches also point downward. On each branch of generation 4 or higher, some leaves sprout. A leaf is a node. As time goes by, leaves turn brown and most of them evenutally fall.

Instructions

Options