How could you write code to find the area of a polygon with 2 loops, one with vertices going in a clockwise direction and another with its vertices going in an counterclockwise direction (such as a rough figure of 8)? The current code I have written can only calculate for one direction, so the total area I get is of one loop with the area of the other loop subtracted.
The same problem stands for working out the second moment of area of the polygon.
Best Answer