Date: Mon, 13 Aug 2001 13:08:47 +0200
To: efg2@efg2.com
From: Frank vhV
Subject: ComputerLab Feedback
Dear Earl,
First of all I want to thank you for your information on your EFG page. It
has already helped me through some graphical problems (graphical problems
are not my normal type of problems as I am a chemical engineer).
I refer to your example of polygon and centroid lab report : Area and
centroid of a Non-Convex Polygon.
Your example uses Green's theorem where a is calculated as a subtraction of
two products (X1*Y2 - X2*Y1) (Forgive me that I do not use subscripts as
Eudora does not allow me to do so but you'll understand anyway ;-)
This is nice for X and Y values lower than say 1.0E6 (like pixel coordinates).
However when this theorem is used to calculate the area of polygons that
have vertices that represent "real" data (e.g. map absolute coordinate
points that represent a gas cloud contour) that exceed 1.0E6, the error
will quickly increase because the product of both terms in Green's formula
are getting so big (1.0E12 or larger) that subtraction of these two large
terms may result in unexpected deviations when using Delphi's Double type
of variable.
A double variable has 15 or 16 significant digits.
Try this example:
Area := 3/4 - 2/3 ;
Area := (1.0E12+3/4) - (1.0E12+2/3) ;
Both answers will differ.
Maybe you could put some extra information on your Internet page that
explains about this behavior when people apply this theorem on data points
that have a large absolute values.
Regards,
Frank.