This function applies "polybool" to 2 polygons being located in one plane in threedimensional space through adequate projections.
The function does not check if both polygons are subsets of the same plane, this is a precondition.
polygon1 & polygon2: Enter as 3xN-Matrices. N corresponds to the number of polygon corners.
flag: select operation to be perfomed by "polybool" (https://de.mathworks.com/help/map/ref/polybool.html)