Simplified code to use utility functions that reflect perimeter points around the horizontal or vertical axis.