What does the shoelace formula mean for polygons with crossings?

672 Views Asked by At

Given a simple polygon with vertices (in order) $v_1,v_2,\ldots,v_n$, the area of this polygon can be computed based on only the coordinates of these vertices via the shoelace formula:

$$A=\frac{1}{2}\left|\ \sum_{i=1}^{n-1} (x_iy_{i+1}-y_ix_{i+1}) + (x_{n}y_{1} - y_{n}x_{1})\ \right|,$$ where $v_i=(x_i,y_i)$.

We can still compute this value if we have a polygon that is formed by a single boundary (so no holes), but has multiple crossings. Does the value $A$ have a geometric meaning in this case?


To motivate the problem, let me give an example. Take the following polygonal chain with vertices A-F:

enter image description here

In this case, $A=15$. If we sum up the areas of ABH, EFHG, and GCD, we get the same value. So, in this case the area in GHI is counted two times, and in the other parts of the polygon the area is counted once.

So, it seems that $A$ is equal to the total area in the polygon, but certain regions are counted more than once, depending on the specific order of crossing. This leads to the following questions:

  • Is it indeed true that $A$ is a weighted sum of the 'subareas' of the polygon, and how can we prove this?
  • How can we determine the weights for each area?
1

There are 1 best solutions below

1
On BEST ANSWER

Given a cyclic polygon $\gamma: (x_i,y_i)_{1\leq i\leq n}$ in the $(x,y)$-plane the expression $$A:={1\over2}\sum_{cyc} (x_iy_{i+1}-x_{i+1}y_i)$$ represents the following quantity: The curve $\gamma$ has for each point ${\bf z}\notin\gamma$ a certain winding number $n_\gamma({\bf z})\in{\mathbb Z}$. Geometrically you can determine this number by drawing a ray starting at ${\bf z}$ and going out to infinity in an arbitrary direction. Then count all intersections of $\gamma$ with this ray according to sign: crossings from right to left count as $+1$, and crossings from left to right count as $-1$. The total is $n_\gamma({\bf z})$.

The answer to your question then is: An "area element" centered at ${\bf z}$ is counted $n_\gamma({\bf z})$ times in the expression $A$.

The proof of this is somewhat involved. Unfortunately I cannot give an easy reference.