- This problem is in 3D space.
- There is a rectangle, defined by 4 vertices. We rotate it around one of its sides.
- There is a triangle, defined by 3 vertices.
- After a full 360 degree rotation, will the rectangle ever intersect/touch the triangle?
- If so, what is the angle of rotation at which intersection first occurs? And what is the point of this first intersection?
After thinking about this for a while, it seems like there are 3 main cases:
- triangle vertex touches rectangle surface
- triangle surface touches rectangle vertex
- triangle edge touches rectangle edge
And there are 2 unlikely cases where the two are perpendicular when the intersect:
- rectangle edge hits triangle surface
- rectangle surface hits triangle edge
However identifying these cases hasn't really gotten me closer to a solution. I'm hoping someone can point me in the right direction for how to solve this problem. I want to solve it fast for a small number of rectangles x a large number of triangles.
Context: the larger problem I'm trying to solve is I want to wrap a rectangle around a closed polygonal mesh. I wish to do this step by step by rotating the rectangle until it intersects, then rotating the remaining rectangle around the intersection point, etc.