# POLYAREA

## Purpose:

Calculates the area of a closed loop series.

## Syntax:

POLYAREA(series)

series |
- |
Optional. A series. Defaults to the current
Window. |

## Alternate Syntax:

POLYAREA(xseries, yseries)

xseries |
- |
Optional. A series. Defaults to the X values
of the current Window. |

yseries |
- |
Optional. A series. Defaults to the Y values
of the current Window. |

## Returns:

A scalar, the closed polygon area..

## Example:

W1: gsin(6, 1, 1/5)

W2: gcos(6, 1, 1/5)

W3: xy(w1, w2)

W4: {polyarea(w3)}

W3 contains a regular pentagon. W4 contains the value 2.377641, the
approximate area of the pentagon.

## Example:

f := 6;

W1: gsin(f+1, 1, 1/f)

W2: gcos(f+1, 1, 1/f)

W3: xy(w1, w2)

W4: {polyarea(w3)}

W3 contains a regular hexagon parameterize by the hot variable f. W4
contains the value 2.598076, the approximate area of the hexagon.

f = 8;

Changing f to 8 creates an octagon in W3 with the area calculated in
W4 as 2.828427.

## Example:

f := 6;

W1: gsin(f+1, 1, 1/f)

W2: gcos(f+1, 1, 1/f)

W3: {polyarea(w1, w2)}

Same as the previous example except the X and Y values

## Remarks:

POLYAREA expects a closed polygon and
automatically adds the closing point
if the starting point does not equal the ending point.

See CAREA to compute
the area of an arbitrary closed loop curve.

## See Also:

AREA

CAREA

CUMTRAPZ

INTEG

TRAPZ