Completed

# jQuery Irregular Polygon Area Calculator Online Visual Tool

This project was successfully completed by oldhendra for \$95 USD in 5 days.

\$30 - \$250 USD
5 days
5
###### Project Description

*************A Mockup or Demo will help us accept your bids faster******************

I need online visual calculator for Irregular Polygon Area like [url removed, login to view] but in Javascript jQuery not in Flash.

The user must be able to visually draw any number of sides and the js code should be able to calculate the area drawn when the user

closes the polygon draw. The user also must be able to edit the shape by moving the sides and changing the sides length and adding points to any side.

The code must by working in all browsers.

The math for calculating the irregular Polygon area is easy, here is a function to do this as an example:

===================================================================

Algorithm to find the area of a polygon

If you know the coordinates of the vertices of a polygon, this algorithm can be used to find the area.

Parameters

X, Y Arrays of the x and y coordinates of the vertices, traced in a clockwise direction, starting

at any vertex. If you trace them counterclockwise, the result will be correct but have a negative sign.

numPoints The number of vertices

Returns the area of the polygon

The algorithm, in JavaScript:

function polygonArea(X, Y, numPoints)

{

area = 0; // Accumulates area in the loop

j = numPoints-1; // The last vertex is the 'previous' one to the first

for (i=0; i<numPoints; i++)

{ area = area + (X[j]+X[i]) * (Y[j]-Y[i]);

j = i; //j is previous vertex to i

}

return area/2;

}

===================================================================

The math for that here [url removed, login to view]

JS example here: [url removed, login to view]

## Hire Freelancers who also bid on this project

• Forbes
• The New York Times
• Time
• Wall Street Journal
• Times Online