next up previous contents index
Next: circle Up: Reference Previous: wlbg_adap   Contents   Index

area

$ \bigcirc$Name


area Compute the (algebraic) area of a curve (Dlist)




$ \bigcirc$Command Synopsis


area in .



in : input curve (Dlist)

. (screen output) : result (double)




$ \bigcirc$Function Summary


double area (in )

Dlist in ;




$ \bigcirc$Description


This module computes the algebraic area of a curve P1P2...Pn (Dlist), viewed as a closed polygon P1P2...PnP1. Thus, it computes

area(P1P2...PnP1) = $\displaystyle {\textstyle\frac{1}{2}}$$\displaystyle \sum_{{i=1}}^{n}$det(Pk - P1, Pk+1 - P1),

with

det$\displaystyle \left[\vphantom{\left(\begin{array}{l}a\\  b\end{array}\right),\left(\begin{array}{l}c\\  d\end{array}\right)}\right.$$\displaystyle \left(\vphantom{\begin{array}{l}a\\  b\end{array}}\right.$$\displaystyle \begin{array}{l}a\\  b\end{array}$$\displaystyle \left.\vphantom{\begin{array}{l}a\\  b\end{array}}\right)$,$\displaystyle \left(\vphantom{\begin{array}{l}c\\  d\end{array}}\right.$$\displaystyle \begin{array}{l}c\\  d\end{array}$$\displaystyle \left.\vphantom{\begin{array}{l}c\\  d\end{array}}\right)$$\displaystyle \left.\vphantom{\left(\begin{array}{l}a\\  b\end{array}\right),\left(\begin{array}{l}c\\  d\end{array}\right)}\right]$ = ad - bc.

The result is the area of the original curve if it is closed (Pn = P1), with a plus sign if the interior of the polygon is ``on the left'' as the point index increases, and a minus sign else.




$ \bigcirc$See Also


dkinfo.


$ \bigcirc$Version 1.0


Last Modification date : Thu Nov 29 20:23:56 2001


$ \bigcirc$Author


Lionel Moisan






next up previous contents index
Next: circle Up: Reference Previous: wlbg_adap   Contents   Index
mw 2004-05-05