Adding a rectangle from three points