The inputs we are interested in (for now) are mouse move events and mouse clicks.
Each mouse move event will generate an x and y coordinate. We will map these to the angle change of branches from their parent at each split in the tree, x will define the angle of the left branch, while y will define the angle of the right branch.
We will map click events to growing the tree another iteration.
That is, the mouse events will reduce (actually scan, as we need the result after each click) to an object representing our trees structure, while the mouses position will map to pairs of angles defining how our branches bend in each split of the tree. Merged together, the combination of the latest output from these two streams will give us a complete representation of our binary tree.