Area enclosed by a polygon

From support e-mail:

Q: Will DPLOT compute the area and or acreage within a closed plotted polygon?

A: Yes. If you use the $AREA shortcut in any text entry (title lines, axis labels, legend, etc.) DPlot will report the area enclosed by your polygon. If the points are arranged in a clockwise direction the value will be positive; if counterclockwise the value will be negative. You can force a positive answer by using the absolute value operation, as in "Area=$=(ABS($AREA))". The initial "$=" tells DPlot an equation follows, which must be enclosed by parentheses.

If you have more than 1 curve then you'll need to use $AREA(n), where n is the 1-based index of the curve.

For most applications (and in particular since you asked about acreage) the value replacing $AREA is perfect. If you're trying to find the area enclosed by what should be a smooth curve, though, you might need to generate more points, if possible. The circle below was generated with X=f(t), Y=g(t) with X=2*cos(t), Y=2*sin(t) with the spacing in t set to 1 degree. The difference between the calculated area and the well-known area of a circle is due to the spacing between points.

In case anybody is wondering, the plain text for that text note is:

R	=2
Area	=$AREA
{\sp}r{\u2}	=$=(PI*4)

with the tab stop set to 5 characters.

For more information see How do I find the area under a curve? in the online manual.

About this Entry

This page contains a single entry by David Hyde published on May 13, 2009 11:55 AM.

Area between 2 curves was the previous entry in this blog.

Ternary plot options for rocks is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.



Powered by Movable Type 4.25