Three points moving on a rectangle