I have a pandas dataframe with 3 columns, PointsA["x", "y", "z"] and PointsB["x", "y", "z"].
I can generate the convex hull ConvexHull(PointsA) Note I'm assuming this only uses the x and y since convex hull in a 2D function.
I want to calculate if each point in PointsB is inside or outside the convex hull of PointsA.
If a point in PointsB is in the convex hull of pointsA then the value True is set to a new column in PointsB["in_A"], and if not, then False.
So far I have the following:
PointsA = pointcloudA[['x', 'y', 'z']]
PointsB = pointcloudB[['x', 'y', 'z']]
Convexhull_of_A = ConvexHull(PointsA)
# which of PointsB are in the `Convexhull_of_A`, assign PointsB['in_A'] == True
# which of PointsB are not in the `Convexhull_of_A`, assign PointsB['in_A'] == False