import math


def rotateAroundPoint(point, degrees, origin=[0,0]):
  """ Rotate a point [X,Y] around a defined origin [X,Y] """

  dx = point[0] - origin[0]
  dy = point[1] - origin[1]
  cos = math.cos(math.radians(float(degrees)))
  sin = math.sin(math.radians(float(degrees)))
  qx = origin[0] + cos*dx - sin*dy
  qy = origin[1] + cos*dy + sin*dx

  return qx,qy