comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » pollyfillv, area of a blob, etc...
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: pollyfillv, area of a blob, etc... [message #59657 is a reply to message #59581] Fri, 04 April 2008 04:03 Go to previous message
jameskuyper is currently offline  jameskuyper
Messages: 79
Registered: October 2007
Member
JP wrote:
> On Apr 4, 1:16 am, David Fanning <n...@dfanning.com> wrote:
>> I suppose the centroid of the polygon is the average
>> value of it vertices, or maybe the mean if you didn't
>> want to overbias outliers.
>
> I guess you meant "the average value of it vertices, or maybe the
> MEDIAN" ??
>
> In any case, thank you. I didn't realize that the centroid is just the
> mean of the vertices in the two dimensions.

It isn't. David's routine calculates the centroid of the vertices
themselves; that's not the same as the centroid of the polygon that they
define.

Consider the polygon [[0,0],[1,0],[1,1],[0,1],[0,0.5]]. It's centroid is
clearly [0.5,0.5], the same as the one for [[0,0],[1,0],[1,1],[0,1]],
but the vertices have a different average. Taking the mean of the
vertices is at best an approximation.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Curl, Gradient and Divergence
Next Topic: Does the ENVI_SVM_DOIT function have memory leak problem?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 01:00:42 PDT 2025

Total time taken to generate the page: 0.08491 seconds