I have two polyhedra, $A = V_1\times F_1$ and $B=V_2\times F_2$ where $V_i$ is set of vertices (which are just coordonate in $\mathbb R^3$) and $F_i$ is a set of faces (tuples of length $\geq 3$ such as $(i_1,...,i_k) \in F_i$ iff there is a face formed by the $i_1$-th,...,$t_k$-th vertices of $A_i$). Then, if I want to draw a cube, I will have 8 vertices in $V$ and 6 tuples of length $4$ that define the vertices of each square that makes the 6 faces of my cube.
These are not necessarily convex (but at least they are connected).
Find an algorithm that takes $A,B$ and return $C$ the intersection of the two polyhedra.
I found this on the stack network: https://mathoverflow.net/questions/141703/intersection-of-polyhedra
But the answers focuses on collision detection rather than returning the intersection of the two bodies.
The other articles I found online seem also to be all about collision detection rather than intersection.
I first imagine to approximate polyhedra with voxels, since it is pretty easy to find intersections of 0-1 arrays. But In my case, I would need too many voxels, then it would lead to too much memory use.
I do not have any other idea to solve efficiently my problem.