H-tree fractal combined with a couple of built-in canvas tricks to make it look like a realistic tree. Click 'Generate Random Tree' button at the bottom of the sceen to create a different randomized tree.
This technique includes a very simple constructor function to draw a line that is called recursively to create a fractal shape.