Creates a rotation matrix, defined by a rotation angle in degrees around the pivot point located at the coordinates (px, py).