'Return a Path representing a circle of a given radius and center.
Parameters
center : pair of floats
The center of the circle. Default ``(0, 0)``.
radius : float
The radius of the circle. Default is 1.
readonly : bool
Whether the created path should have the "readonly" argument
set when creating the Path instance.
Notes
The circle is approximated using cubic Bezier curves.  This
uses 8 splines around the circle using the approach presented
here:
Lancaster, Don.  `Approximating a Circle or an Ellipse Using Four
Bezier Cubic Splines <http://www.tinaja.com/glib/ellipse4.pdf>`_.'

@classmethod
def circle(cls, center=(0.0, 0.0), radius=1.0, readonly=False):

    MAGIC = 0.2652031
    SQRTHALF = np.sqrt(0.5)
    MAGIC45 = np.sqrt(((MAGIC * MAGIC) / 2.0))
    vertices = np.array([[0.0, (-1.0)], [MAGIC, (-1.0)], [(SQRTHALF - MAGIC45), ((- SQRTHALF) - MAGIC45)], [SQRTHALF, (- SQRTHALF)], [(SQRTHALF + MAGIC45), ((- SQRTHALF) + MAGIC45)], [1.0, (- MAGIC)], [1.0, 0.0], [1.0, MAGIC], [(SQRTHALF + MAGIC45), (SQRTHALF - MAGIC45)], [SQRTHALF, SQRTHALF], [(SQRTHALF - MAGIC45), (SQRTHALF + MAGIC45)], [MAGIC, 1.0], [0.0, 1.0], [(- MAGIC), 1.0], [((- SQRTHALF) + MAGIC45), (SQRTHALF + MAGIC45)], [(- SQRTHALF), SQRTHALF], [((- SQRTHALF) - MAGIC45), (SQRTHALF - MAGIC45)], [(-1.0), MAGIC], [(-1.0), 0.0], [(-1.0), (- MAGIC)], [((- SQRTHALF) - MAGIC45), ((- SQRTHALF) + MAGIC45)], [(- SQRTHALF), (- SQRTHALF)], [((- SQRTHALF) + MAGIC45), ((- SQRTHALF) - MAGIC45)], [(- MAGIC), (-1.0)], [0.0, (-1.0)], [0.0, (-1.0)]], dtype=float)
    codes = ([cls.CURVE4] * 26)
    codes[0] = cls.MOVETO
    codes[(-1)] = cls.CLOSEPOLY
    return Path(((vertices * radius) + center), codes, readonly=readonly)
