I have 2 squares with the same orientation. I know the coordinate of their centers. They have the same size area.
They may intersect each other. I want to compute their area of their intersection as well as area of their union.
Let's say that their centers are (a, b) for the first square and (x, y) for the second square. The length of one of their sides is l. How can I compute their intersection and their union based on this?