From 0e718c885d80ffdf74dcf73be4b28324c592df3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9B=BC=E5=B0=8F=E8=BE=89=E4=B8=B6?= <760198141@qq.com> Date: Sun, 17 Oct 2021 22:05:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=96=B0=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SciPy Spatial/Problem 1/D.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 SciPy Spatial/Problem 1/D.py diff --git a/SciPy Spatial/Problem 1/D.py b/SciPy Spatial/Problem 1/D.py new file mode 100644 index 0000000..62cf747 --- /dev/null +++ b/SciPy Spatial/Problem 1/D.py @@ -0,0 +1,8 @@ +import numpy as np +from scipy.spatial import Delaunay +import matplotlib.pyplot as plt +points = np.array([[2, 4], [3, 4], [3, 0], [2, 2], [4, 1], [5, 5]]) +simplices = Delaunay(points).coplanar +plt.triplot(points[:, 0], points[:, 1], simplices) +plt.scatter(points[:, 0], points[:, 1], color='m') +plt.show() \ No newline at end of file -- GitLab