On May 21, 2008, at 7:10 AM, rleuthold wrote:

Does somebody know of a class which calculates the area of an irregular polygon ?

If it's not a self-intersecting polygon:

1/2 * ((x1+x2)(y1-y2)+(x2+x3)(y2-y3)+...+(xn+x1)(yn-y1))

The generalized method is basically:

1/2 * ( Sum from 0 to n-1) (Xn * Yn+1) - (Xn+1 * Yn)

For a self-intersecting polygon it's quite complicated.

good luck,

jon

Reply via email to