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

Home » Public Forums » archive » Re: 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 #59578] Thu, 03 April 2008 07:16 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
JP writes:

> by the way, I would be happy if at least I could calculate the
> centroid of each polygon and then get the array index for each
> centroid.

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. In your case, you could
probably just pick a vertex and be pretty darn close
to it. :-)

> But I don't know how to calculate the centroid (Coyote's procedure
> CENTROID works with an array, not with a polygon).
>
> And if I had the centroid, how do I easily get the array index?

ROUND would probably work. :-)

Or, if you polygons were in some other coordinate system,
you will have to convert from that system to device coordinates.
CONVERT_COORD will be helpful.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: How to compute the merged volume of two 3D objects
Next Topic: IDL 7.0 Java connector

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

Current Time: Wed Oct 08 15:22:21 PDT 2025

Total time taken to generate the page: 0.00595 seconds