Matching shapes with a reference point