Computes the Area of a Polygon

DESCRIPTION:

Uses a discrete version of Green's Theorem to calculate the area of a polygon.

USAGE:

poly.area(x, y) 

REQUIRED ARGUMENTS:

x
a list with components named "x" and "y", a 2-column matrix, or a vector containing the horizontal coordinates of the vertices that form the polygon of interest.

OPTIONAL ARGUMENTS:

y
if x is a vector of X-coordinates then this must contain the corresponding vertical or Y-coordinates.

VALUE:

a double precision number representing the area enclosed by the polygon with vertices defined by x and y

SEE ALSO:

,

EXAMPLES:

lansing.chull <- lansing[chull(lansing),] 
poly.area(lansing.chull)     # This should be close to unity.