Skip to main content
Broken link fixed.
Source Link
Joseph O'Rourke
  • 150.8k
  • 36
  • 358
  • 958

I don't think there is a simple criterion, no, assuming your parallelograms are arbitrary. An approach less general than that suggested by HenrikRüping, but likely easier to code is this. Check if one of the four vertices of $A$ is inside $B$. If so, return yesYes. Next check each edge of $A$ for intersection with each edge of $B$. If an edge intersection is detected, return yesYes. If all these tests fail, return noNo. How to perform the primitive intersection tests is all over the web, and in particularincluding herehere.

I don't think there is a simple criterion, no, assuming your parallelograms are arbitrary. An approach less general than that suggested by HenrikRüping, but likely easier to code is this. Check if one of the four vertices of $A$ is inside $B$. If so, return yes. Next check each edge of $A$ for intersection with each edge of $B$. If an edge intersection is detected, return yes. If all these tests fail, return no. How to perform the primitive intersection tests is all over the web, and in particular here.

I don't think there is a simple criterion, no, assuming your parallelograms are arbitrary. An approach less general than that suggested by HenrikRüping, but likely easier to code is this. Check if one of the four vertices of $A$ is inside $B$. If so, return Yes. Next check each edge of $A$ for intersection with each edge of $B$. If an edge intersection is detected, return Yes. If all these tests fail, return No. How to perform the primitive intersection tests is all over the web, including here.

Source Link
Joseph O'Rourke
  • 150.8k
  • 36
  • 358
  • 958

I don't think there is a simple criterion, no, assuming your parallelograms are arbitrary. An approach less general than that suggested by HenrikRüping, but likely easier to code is this. Check if one of the four vertices of $A$ is inside $B$. If so, return yes. Next check each edge of $A$ for intersection with each edge of $B$. If an edge intersection is detected, return yes. If all these tests fail, return no. How to perform the primitive intersection tests is all over the web, and in particular here.