0

I have created a convex hull using scipy.spatial.ConvexHull. I need to compute the intersection point between the convex hull and a general line , starting from internal point and ending in external point, so the intersection should be guaranteed. The dimension of the problem can vary between 2 and 3.

the problem is similar to old problem. I'd like ho have a generalized one

1 Answers1

0

For a suboptimal (linear time) but easy solution, consider a plane containing the line and intersect every edge of the 3D hull with that plane. Then rotate the plane and points onto xy, and you reduced the problem to 2D.

Construct the 2D convex hull and intersect every edge with the line. (If you keep the connections between the piercing points that belong to the same faces, you needn't even rebuild the 2D hull.)