Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def isInHull(P,hull):
- '''
- Datermine if the list of points P lies inside the hull
- :return: list
- List of boolean where true means that the point is inside the convex hull
- '''
- A = hull.equations[:,0:-1]
- b = np.transpose(np.array([hull.equations[:,-1]]))
- isInHull = np.all((A @ np.transpose(P)) <= np.tile(-b,(1,len(P))),axis=0)
- hull = ConvexHull(X)
Add Comment
Please, Sign In to add comment