Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.pascal.delphi.misc > #190
| From | Dr J R Stockton <reply1204@merlyn.demon.co.uk> |
|---|---|
| Newsgroups | comp.lang.pascal.delphi.misc |
| Subject | Re: Calculate area of an enclosed irregular shape |
| Date | 2012-01-24 18:53 +0000 |
| Organization | Home |
| Message-ID | <As6vSMFM4vHPFwNB@invalid.uk.co.demon.merlyn.invalid> (permalink) |
| References | <a306d243-b288-4b1d-a5a0-6b214de3d1ef@b20g2000yqb.googlegroups.com> |
In comp.lang.pascal.delphi.misc message <a306d243-b288-4b1d-a5a0-6b214de 3d1ef@b20g2000yqb.googlegroups.com>, Mon, 23 Jan 2012 14:11:03, PG <paulgent@gmail.com> posted: >Hi, > >I have a series of approx. 40 points (x,y) that make up an irregular >shape. > >Is there a simple library / function that I can call that will >calculate the enclosed area of this shape? If you can pick one point within or on the edge of the area from which the points appear everywhere concave (approximate example, the Isle of Wight - Newport, but not Yarmouth or either side of Cowes), then you can draw imaginary lines from that point to each of the 40 (or 39), splitting it up into triangles. The area of a triangle is easy enough, for example by Root s s-a s-b s-c, and you can add them all together. Everywhere concave is in fact too strong; the need is to be able to see all of the inside of the border from the point. Otherwise, there will have to be subtractions. There will probably be a better way, and that probably does not matter. Google for area of a many-point irregular polygon soon finds http://en.wikipedia.org/wiki/Polygon which gives sufficient answers for most cases. -- (c) John Stockton, nr London UK. ?@merlyn.demon.co.uk Turnpike v6.05 MIME. <http://www.merlyn.demon.co.uk/> TP/BP/Delphi/&c., FAQqy topics & links; <http://www.merlyn.demon.co.uk/clpb-faq.txt> RAH Prins : c.l.p.b mFAQ; <ftp://garbo.uwasa.fi/pc/link/tsfaqp.zip> Timo Salmi's Turbo Pascal FAQ.
Back to comp.lang.pascal.delphi.misc | Previous | Next — Previous in thread | Next in thread | Find similar
Calculate area of an enclosed irregular shape PG <paulgent@gmail.com> - 2012-01-23 14:11 -0800 Re: Calculate area of an enclosed irregular shape Jamie <jamie_ka1lpa_not_valid_after_ka1lpa_@charter.net> - 2012-01-23 18:21 -0500 Re: Calculate area of an enclosed irregular shape Dr J R Stockton <reply1204@merlyn.demon.co.uk> - 2012-01-24 18:53 +0000 Re: Calculate area of an enclosed irregular shape Jim Higgins <invalid@invalid.invalid> - 2012-01-25 19:42 +0000
csiph-web