This function takes x and y coordinates and rotates them counterclockwise by the specified number of degrees, and mean centers the points.
Useful links