Math question: How to compute the area of polygons

Ben Rubinstein benr_mc at
Thu Mar 20 12:58:01 EST 2003

on 20/3/03 4:24 pm, Malte Brill wrote

> Even though I start thinking I´m not smart enough to code a solution on my own
> at the moment
> ...snip...
> I'm still very interested in computing areas of polygons and their unions

I know this is no use for intersection testing, but for other possible - non
time critical - requirements to calculate areas of polygons, Mr Crude
Approach just can't help mentioning an alternative to the fascinating
algorithms discussed, namely: let Scott do the hard work.
That is, get Rev to draw the polygon (or polygons), solid colour, against a
different solid colour background.  Import a snapshot.  Read the image data.
Count pixels of the appropriate colour.  Result: area of polygon or union of
polygons. No maths training needed!  (Except addition.)  To calculate area
of intersection, use two colours and an ink effect!

There.  I've said it.  Now I feel dirty and ashamed and will crawl off and
  Ben Rubinstein               |  Email: benr_mc at
  Cognitive Applications Ltd   |  Phone: +44 (0)1273-821600        |  Fax  : +44 (0)1273-728866

More information about the use-livecode mailing list