making a game where terrain is randomly generated
or just a way to generate trees without any of the trees overlapping
This example might help you.