Given two convex sets $A$ and $B$ in a vector space, their intersection is not empty iff the difference set $A-B=\{p-q|p\in A, q\in B}$$A-B=\{p-q|p\in A, q\in B\}$ contains the origin. In your setting the difference set is the convex hull of 16 points. Actually 8 of them are enough and you have to check that 0 is on the same side of any of the 8 edges than the difference convex polygon.
Pierre Dehornoy
- 1.9k
- 1
- 17
- 24