Generate and draw a fractal tree.

 Draw the trunk
 At the end of the trunk, split by some angle and draw two branches
 Repeat at the end of each branch until a sufficient level of branching is reached


Related tasks
 Pythagoras Tree


func tree x y deg n . .
  if n > 0
    linewidth n * 0.4
    move x y
    x += cos deg * n * 1.3 * (randomf + 0.5)
    y += sin deg * n * 1.3 * (randomf + 0.5)
    line x y
    call tree x y deg - 20 n - 1
    call tree x y deg + 20 n - 1
  .
.
timer 0
on timer
  clear
  call tree 50 90 -90 10
  timer 1
.