matplotlib.patches
as
mpatches
import
matplotlib.path
as
mpath
def
wise
(
v
):
return
{
+
1
:
"CCW"
,
-
1
:
"CW"
}[
v
]
def
make_circle
(
r
):
t
=
(
0
,
*
2.0
,
0.01
)
x
=
r
*
(
t
)
y
=
r
*
(
t
)
return
((
x
,
y
))
,
=
()
=
make_circle
(
0.5
)
=
make_circle
(
1.0
)
=
(
len
(
),
)
[
0
]
=
for
,
(
,
)
in
enumerate
(((
1
,
1
),
(
1
,
-
1
),
(
-
1
,
1
),
(
-
1
,
-
1
))):
=
((
[::
],
[::
]))
+=
(
*
2.5
,
0
)
=
((
,
))
=
(
,
)
=
(
,
facecolor
=
'#885500'
,
edgecolor
=
'black'
)
(
)
(
f
"Outside
{
wise
(
)
}
,
\n
Inside
{
wise
(
)
}
"
,
(
*
2.5
,
-
1.5
),
va
=
"top"
,
ha
=
"center"
)
(
xlim
=
(
-
2
,
10
),
ylim
=
(
-
3
,
2
),
aspect
=
1
,
title
=
"Mmm, donuts!"
)
()