擅长:python、mysql、java
<p>似乎甚至不需要剪裁;因为所有曲面都是闭合的。你知道吗</p>
<pre><code>import numpy as np
import matplotlib.pyplot as plt
fig, ax = plt.subplots(figsize=(6, 6))
xi, yi = np.array([(-0.2, -0.2), (-0.2, 0.2), (0.2, 0.2), (0.2, -0.2), (-0.2, -0.2)]).T
xo, yo = np.array([(-1, 1.), (-1, -1.), (1, -1.), (1., 1.), (-1, 1.)]).T
plt.fill(list(xo)+list(xi), list(yo)+list(yi), facecolor='green', zorder=5)
plt.fill(list(xo+.3)+list(xi+.3), list(yo+.3)+list(yi+.3), facecolor='red', zorder=4)
plt.show()
</code></pre>
<p><a href="https://i.stack.imgur.com/0DYyi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0DYyi.png" alt="enter image description here"/></a></p>