I have a 2D square S. S is described by s, the side length, theta, the angle it is rotated by, and c, the position of S's center.
There is an axis-aligned rectangle R that extends infinitely in the x direction. The bottom of R has height 0, and the top of R has some height k.
I need to find the magnitude of the area this rotated square intersects with R. I'm confident I could do this with some crufty logic and line-line intersections, but is there an elegant way to accomplish the same?