splitTree function

Split tree at a point