The simplest binary tree possible . With print function. I've used recursion on this code cause I wanted to make it simple, but I know for larger trees it might blow the stack call.
This is a terrain generator example. From a noise map you can generate a 3D terrain using Three.Js. The instructions on how to use it is in the comments of the html portion.