Determining if figures are related by a rotation