0
votes

Is there any scipy method that computes the Convex hull of two non intersecting polygon? I have 2 set of points P1 and P2 and their convex hulls CH(P1) and CH(P2), where the hulls are non intersecting. I want to find the Convex hull of union of points in P1 and P2. Is there any build in method in scipy?

1
Coding questions and questions about specific programming libraries or languages are off-topic on CS.SE, but can be asked on Stack Overflow. See our help center. CS.SE is for questions about concepts, algorithms, and science.D.W.

1 Answers

0
votes

Documentation for Scipy's convex hull implementation can be found here. Simply concatenate the two arrays of points to obtain their union. Feed this set to the convex hull algorithm.

Every point in each polygon lies within the convex hull of its polygon. In turn, both polygons have their convex hull contained entirely inside the larger convex hull. So, every point in each polygon lies within the larger convex hull, meaning it is also valid for the complete union of polygon points.