First click to place the root; after that, all clicks will determine the terminals. When finish, just click the magic button !

The little "rectangles" are generated automatically as the obstacles to avoid the line connecting points directly.