the upper portion of the code is the same as ‘self-teaching #21Y001 scatter plot’.
the difference is the new portion of function def ‘encircle’.
np.c[x,y] concatenates two lists, example below
np.c_[np.array([1,2,3]), np.array([4,5,6])]
returns >>>>>> array([[1, 4], [2, 5], [3, 6]])
hull = ConvexHull(p)
“The convex hull of a set of points is defined as the smallest convex polygon, that encloses all of the points in the set.”
“The convex hull of a set of points is defined as the smallest convex polygon, that encloses all of the points in the set.”







No comments:
Post a Comment