# Path: spriteworld/constants.py
# SHAPES = {
#     'triangle': shapes.polygon(num_sides=3, theta_0=np.pi/2),
#     'square': shapes.polygon(num_sides=4, theta_0=np.pi/4),
#     'pentagon': shapes.polygon(num_sides=5, theta_0=np.pi/2),
#     'hexagon': shapes.polygon(num_sides=6),
#     'octagon': shapes.polygon(num_sides=8),
#     'circle': shapes.polygon(num_sides=30),
#     'star_4': shapes.star(num_sides=4, theta_0=np.pi/4),
#     'star_5': shapes.star(num_sides=5, theta_0=np.pi + np.pi/10),
#     'star_6': shapes.star(num_sides=6),
#     'spoke_4': shapes.spokes(num_sides=4, theta_0=np.pi/4),
#     'spoke_5': shapes.spokes(num_sides=5, theta_0=np.pi + np.pi/10),
#     'spoke_6': shapes.spokes(num_sides=6),
# }
# class ShapeType(enum.IntEnum):


import collections
import numpy as np
from matplotlib import path as mpl_path
from matplotlib import transforms as mpl_transforms
from spriteworld import constants
    """Construct sprite.

    This class is agnostic to the color scheme, namely (c1, c2, c3) could be in
    RGB coordinates or HSV, HSL, etc. without this class knowing. The color
    scheme conversion for rendering must be done in the renderer.

    Args:
      x: Float in [0, 1]. x-position.
      y: Float in [0, 1]. y-position.
      shape: String. Shape of the sprite. Must be a key of constants.SHAPES.
      angle: Int. Angle in degrees.
      scale: Float in [0, 1]. Scale of the sprite, from a point to the area of
        the entire frame. This scales linearly with respect to sprite width,
        hence with power 1/2 with respect to sprite area.
      c0: Scalar. First coordinate of color.
      c1: Scalar. Second coordinate of color.
      c2: Scalar. Third coordinate of color.
      x_vel: Float. x-velocity.
      y_vel: Float. y-velocity.
    """
    self._position = np.array([x, y])
    self._shape = shape
    self._angle = angle
    self._scale = scale
    self._color = (c0, c1, c2)
    self._velocity = (x_vel, y_vel)

    self._reset_centered_path()

  def _reset_centered_path(self):

# Path: spriteworld/constants.py
# SHAPES = {
#     'triangle': shapes.polygon(num_sides=3, theta_0=np.pi/2),
#     'square': shapes.polygon(num_sides=4, theta_0=np.pi/4),
#     'pentagon': shapes.polygon(num_sides=5, theta_0=np.pi/2),
#     'hexagon': shapes.polygon(num_sides=6),
#     'octagon': shapes.polygon(num_sides=8),
#     'circle': shapes.polygon(num_sides=30),
#     'star_4': shapes.star(num_sides=4, theta_0=np.pi/4),
#     'star_5': shapes.star(num_sides=5, theta_0=np.pi + np.pi/10),
#     'star_6': shapes.star(num_sides=6),
#     'spoke_4': shapes.spokes(num_sides=4, theta_0=np.pi/4),
#     'spoke_5': shapes.spokes(num_sides=5, theta_0=np.pi + np.pi/10),
#     'spoke_6': shapes.spokes(num_sides=6),
# }
# class ShapeType(enum.IntEnum):


# Path: spriteworld/sprite.py
import collections
import numpy as np
from matplotlib import path as mpl_path
from matplotlib import transforms as mpl_transforms
from spriteworld import constants

    """Construct sprite.

    This class is agnostic to the color scheme, namely (c1, c2, c3) could be in
    RGB coordinates or HSV, HSL, etc. without this class knowing. The color
    scheme conversion for rendering must be done in the renderer.

    Args:
      x: Float in [0, 1]. x-position.
      y: Float in [0, 1]. y-position.
      shape: String. Shape of the sprite. Must be a key of constants.SHAPES.
      angle: Int. Angle in degrees.
      scale: Float in [0, 1]. Scale of the sprite, from a point to the area of
        the entire frame. This scales linearly with respect to sprite width,
        hence with power 1/2 with respect to sprite area.
      c0: Scalar. First coordinate of color.
      c1: Scalar. Second coordinate of color.
      c2: Scalar. Third coordinate of color.
      x_vel: Float. x-velocity.
      y_vel: Float. y-velocity.
    """
    self._position = np.array([x, y])
    self._shape = shape
    self._angle = angle
    self._scale = scale
    self._color = (c0, c1, c2)
    self._velocity = (x_vel, y_vel)

    self._reset_centered_path()

  def _reset_centered_path(self):

    path = mpl_path.Path(constants.SHAPES[self._shape])