class_docstr: Rotation about the origin is equivalent to the matrix [cos(a) sin(a)
  -sin(a) cos(a) 0 0], which has the effect of rotating the coordinate system
  axes by angle a.
class_docstr_tok: ["Rotation","about","the","origin","is","equivalent","to","the","matrix","[","cos","(","a",")","sin","(","a",")","-sin","(","a",")","cos","(","a",")","0","0","]",",","which","has","the","effect","of","rotating","the","coordinate","system","axes","by","angle","a","."]
code: def __init__(self, angle, x=0, y=0):
      Matrix.__init__(self)
      self._angle = angle
      self._x = x
      self._y = y
  
      angle = math.pi * angle / 180.0
      rotate = np.array(
          [
              [math.cos(angle), -math.sin(angle), 0],
              [math.sin(angle), math.cos(angle), 0],
              [0, 0, 1],
          ],
          dtype=float,
      )
      forward = np.array([[1, 0, x], [0, 1, y], [0, 0, 1]], dtype=float)
      inverse = np.array(
          [[1, 0, -x], [0, 1, -y], [0, 0, 1]], dtype=float
      )
      self._matrix = np.dot(inverse, np.dot(rotate, forward))
  
imports: import re
  import math
  import numpy
label_desc: Use image node_id 1 to create a new Rotate object from inherited base classes: Matrix with example: obj = Rotate(angle, x, y)