Skip to main content
2 of 2
added 456 characters in body
Vagabond
  • 1.8k
  • 1
  • 15
  • 22

Observe Two parallelogram $A$ and $B$ can intersect if and only if one edge of $A$ and one edge of $B$ intersects (crosses over) unless one parallelogram is sitting inside the other.

I am assuming the second case does not happen.

So the problem reduces to answering when does two line segment of finite edges intersect.

Here is how to check ...

Take edge $A_{12}$ joing $a_1$ to $a_2$ and $B_{34}$ joining $b_3$ to $b_4$

so in order to check if $A_{12}$ intersects $B_{34}$

take the line defined by $A_{12}$, $b_3$ and $b_4$ should lie on two different sides of this and further ${a_1}, {a_2}$ should lie on opposite side of $B_{34}$.

So one check this by taking some inner products .... we need to check if appropriate sign change happens ...(intermediate value theorem) if it does then lines cross.

Vagabond
  • 1.8k
  • 1
  • 15
  • 22