Find out whether two rectangles are intersecting in 3D space I've got two rectangles in 3D space, each given by the coordinates of their 4 corners. They are not axis aligned, meaning their edges are not necessarily parallel/perpendicular to the world axes. Each rectangle can have any orientation.
Is there an easy way to know whether or not the two rectangles are intersecting?

A point in each rectangle is individuated vectorially by
$$
\eqalign{
  & {\bf P}_{\,1}  = {\bf t}_{\,1}  + a{\bf u}_{\,1}  + b{\bf v}_{\,1} \quad \left| {\;0 \le a,b \le 1} \right.  \cr 
  & {\bf P}_{\,2}  = {\bf t}_{\,2}  + c{\bf u}_{\,2}  + d{\bf v}_{\,2} \quad \left| {\;0 \le c,d \le 1} \right. \cr} 
$$
with an obvious meaning of the vectors
 - ${\bf t} _k$: vector of a chosen vertex;
 - ${\bf u} _k$: vector parallel to a side from the chosen vertex;
 - ${\bf v} _k$: vector parallel to the other side from the chosen vertex;   
Therefore, for the points to coincide we shall have
$$
{\bf P}_{\,1}  = {\bf P}_{\,2} \quad  \Rightarrow \quad a{\bf u}_{\,1}  + b{\bf v}_{\,1}  - c{\bf u}_{\,2}  - d{\bf v}_{\,2}  = {\bf t}_{\,2}  - {\bf t}_{\,1} 
$$
which is a linear system of $3$ equations in $4$ unknowns .
For the rectangles to intersecate each other, we shall verify that
 - the system is solvable (in $a,b,c,d$);
 - the set of solutions intersect the domain $[0,1]^4$.
There are various approaches to verify the first condition.
We can for instance go algebraically and check the  the rank of the coefficients matrix, and that of the complete matrix:
 - if both have rank $3$, we have a set of $\infty ^1$ solutions (a line), depending on one of the unknowns taken as a parameter,
geometrically that means that the planes of the ractangles intersect on a line;
 - if the coefficients matrix has rank $2$, then the rectangles planes are parallel,
and they will be coincident or not depending if the complete matrix has  rank $2$ or $3$,
if they have both rank $2$ then we have $\infty ^2$ solutions (two parameters);
 - if the coefficients matrix has rank $1$, one or both the rectangles are degenerated
(and you can check this case in advance).
