Reputation: 5
In geometry, a polyhedron is a three-dimensional shape with flat polygonal faces, straight edges, and sharp corners or vertices.
I have two convex polyhedrons which intersect with each other. The intersection part of these two polyhedrons is my desire space.
I want to know is there any algorithm that finds this space appropriately? If available, is the code was (open source) written for it?
Upvotes: 0
Views: 680
Reputation:
A simple solution for this would be the following:
A convex polyhedron can be described as the intersection of the half-planes defined by the individual faces of the polyhedron (probably easier to think of this in 2D, but it works just the same way in 3D).
With this definition, finding the intersection is as simple as taking the intersection of the half-planes of both polyhedra. Since this is a rather primitive operation, pretty much any computational-geometry library should support it.
Upvotes: 1