I am trying to find an algorithm that will calculate the intersection between two rectangles that are not necessarily aligned along the axis, and return the resulting intersection.
This question describes whether an intersection exists. I would like to get the resulting view of the intersection, if it exists.
My application of the algorithm will use one rectangle aligned on the axis, and one that is not necessarily oriented along the axis, but the general algorithm is preferable.
Thanks!
source
share