Home » Uncategorized » Green’s Theorem and Area of Polygons

Green’s Theorem and Area of Polygons

In this post we are presenting a simple formula for the area of any simple polygon that only requires knowledge of the coordinates of each vertex. It is as follows:

(1)   \begin{equation*} \mathcal{A} = \sum_{k=0}^{n} \frac{(x_{k+1} + x_k)(y_{k+1}-y_{k})}{2} \end{equation*}

where n is the number of vertices, (x_k, y_k) is the k-th point when labelled in a counter-clockwise manner and the starting vertex is found both at the start and end of the list of vertices meaning  (x_{n+1}, y_{n+1}) = (x_0, y_0).

Solution

The derivation is quite simple and it makes use of Green’s theorem. Green’s Theorem states that, for a “well-behaved” curve \mathcal{C} forming the boundary of a region \mathbb{D}

(2)   \begin{equation*} \oint \limits_\mathcal{C} P(x, y)\; {\rm d}x + Q(x, y)\; {\rm d} y = \iint \limits_{\mathbb{D}} \frac{\partial Q}{\partial x} - \frac{\partial P}{\partial y}\; {\rm d} A \end{equation*}

Since the area of \mathbb{D} is equal to \iint \limits_{\mathbb{D}} \; {\rm d}A we can use Green’s Theorem to calculate area  by choosing P(x, y) =0 and Q(x, y) = x that satisfy

    \[\frac{\partial Q}{\partial x} - \frac{\partial P}{\partial y}=1\]

Thus letting \mathcal{A} be the area of region \mathbb{D} we have that

(3)   \begin{equation*} \mathcal{A} = \oint \limits_{\mathcal{C}} x \, {\rm d}y \end{equation*}

Now, consider the polygon below, bordered by the piecewise-smooth curve C = C_0\cup C_1\cup\cdots\cup C_{n-1}\cup C_n where C_k starts at the point (x_k, y_k) and ends at the “next” point along the polygon’s edge when proceeding counter-clockwise .

Since line integrals over piecewise-smooth curves are additive over length, we have that:

(4)   \begin{equation*} \mathcal{A} = \oint \limits_{\mathcal{C}} x {\rm d} y  = \int \limits_{C_0} x\; {\rm d} y + \cdots + \int \limits_{C_n} x\; {\rm d} y \end{equation*}

To compute the k-th line line integral above, parametrise the segment from (x_k, y_k) to (x_{k+1} , y_{k+1}). Hence

(5)   \begin{equation*} C_k: \bigg((x_{k+1} - x_k)t + x_k,\; (y_{k+1} - y_k)t + y_k \bigg) \; , \;  0\leq t\leq 1 \end{equation*}

Substituting this parametrisation into the integral, we find:

    \begin{align*} \int_{C_k} x\; {\rm d} y &=\int_0^1 \left((x_{k+1} - x_k)t + x_k\right)\left(y_{k+1} - y_k\right) \; {\rm d}t \\ &= \frac{(x_{k+1} + x_k)(y_{k+1}-y_{k})}{2} \end{align*}

Summing all of the C_k‘s we then find the total area:

    \[\mathcal{A} =\sum_{k=0}^{n} \frac{(x_{k+1} + x_k)(y_{k+1}-y_{k})}{2}\]

which is the desired result.

Application: To demonstrate use of this formula, let us apply this to the shape below. A copy of the image is found below, but this one is marked with the coordinates of the vertices.

Starting with the coordinate (0, 0) and proceeding counter-clockwise we apply our formula:

\begin{aligned} \mathcal{A} &= \sum_{k=0}^{n} \frac{(x_{k+1} + x_k)(y_{k+1}-y_{k})}{2} \\ &= \frac{(1.5 + 0)(0 - 0)}{2} + \frac{(2.5 + 1.5)(-1 - 0)}{2} + \frac{(3.5 + 2.5)(0 - (-1))}{2} + \frac{(5+3.5)(0-0)}{2} \\ &\quad + \frac{(5+5)(2-0)}{2} + \frac{(3.5+5)(2-2)}{2} + \frac{(2.5+3.5)(3-2)}{2}\\ &\quad +\frac{(1.5+2.5)(2-3)}{2} + \frac{(0+1.5)(2-2)}{2} + \frac{(0+0)(0-2)}{2}\\ &= 0 + (-2) + 3 + 0 + 10 + 0 + 3 + (-2) + 0 + 0\\ &= 12 \end{aligned}

This post is just a migration from math.overflow.com blog.

Read more

 


Leave a comment

Donate to Tolaso Network