private void setPosition(Point2D point, int x, int y) {
   point.x = x;
   point.y = y;
 }
 private Point2D findNewNodePosition(Point2D left, Point2D right) {
   Point2D newPoint = new Point2D();
   newPoint.x = (left.x + right.x + right.y - left.y) / 2;
   newPoint.y = (left.y + right.y + right.x - left.x) / 2;
   return newPoint;
 }