# Finding Overlap of polygons in 3D space

I'm trying to find the amount of "overlap" between two (or more) polygons in a 3D space.

The planes all have vector normals pointing in the same direction, so they are guaranteed to be parallel to each other.

The concrete example I can think of is as following:

if arranging playing cards perpendicular to a light source such as the sun, where some may overlap, "What is the total area of the shadow they cast?"

Visual example is given below with two "overlapping" polygons:

overlapping polygons

For instance, if the z-axis is shown vertically, the planes might be stacked something like this:

____________________
|
|
|
_________
|
|
_____________


Or viewing the X-Y plane, where - represents areas of overlap which should be counted only once in a final area measurement:

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAA--------------BBB
AAAAAAAAAAAAAAAA--------------BBB
AAAAAAAAAAAAAAAA--------------BBB
AAAAAAAAAAAAAAAA--------------BBB
BBBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBBB
BBBBBB-----------CCCCCCCC
BBBBBB-----------CCCCCCCC
BBBBBB-----------CCCCCCCC
CCCCCCCCCCCCCCCCCCC
CCCCCCCCCCCCCCCCCCC
CCCCCCCCCCCCCCCCCCC
CCCCCCCCCCCCCCCCCCC


Is there an algorithm that can determine the total area "shadow cast" of these polygons? They may not be rectangles, so the data I have to work with will be simply the points of each polygon (and which polygon it belongs to), represented as (x,y,z) digits.