Determining if figures are congruent and related by a transformation