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

Home » Public Forums » archive » data inside a circle
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: data inside a circle [message #44533 is a reply to message #44357] Tue, 21 June 2005 05:01 Go to previous message
James Kuyper is currently offline  James Kuyper
Messages: 425
Registered: March 2000
Senior Member
Ben Tupper wrote:
...
> I guess I am a bit late with this but the following is from the online
> help to IDL 6.1
>
> " The IDLanROI::ContainsPoints function method determines whether the
> given data coordinates are contained within the closed polygon region."
>
> So, you could define the circle boundary as the ROI and pass the points
> to the object method.

A circle is not a closed polygon. It can be approximated with arbitrary
accuracy by a closed polygon with a sufficiently large number of sides.
However, as long as you use a finite number of sides, there will always
be a certain amount of inaccuracy in that approximation. The more sides
you use, the slower the comparison; at some desired level of accuracy,
it's quicker to perform the correct test for being inside a circle,
than it is to test for being inside a polygon approximation to a
circle.

In any event, the key problem in this particular problem is not the
test for being inside a single cirle; the problem is that the test is
against a very large number of circles. Doing that efficiently in IDL
is tricky; and it's not clear to me that IDLanROI::ContainsPoints helps
address that problem.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to calculate the curve area?
Next Topic: Re: How to calculate the curve area?

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

Current Time: Wed Dec 03 17:22:31 PST 2025

Total time taken to generate the page: 3.92267 seconds