Slight changes about the rotatePolygon function

The function can now be used in the main