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

Home » Public Forums » archive » Already written function to find if a point is within a rectangle?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Already written function to find if a point is within a rectangle? [message #79347] Mon, 20 February 2012 13:29 Go to previous message
Jacare Omoplata is currently offline  Jacare Omoplata
Messages: 6
Registered: February 2012
Junior Member
Hi,

I'm working with some data that has been extracted from astronomical
images. All the stars in the images have been identified and their x
and y positions are recorded among other information. ( these x and y
position can be converted the Right Ascension (RA) and Declination
(DEC), so the position of the star in the sky can be found )

These images overlap. I want to plot the positions of all the stars
from all the images, but because of image overlaps, some points are
going to be counted twice. Since the RA and DEC are floating point
numbers, for the same star in two images they might be slightly
different. So using the RA and DEC to identify double counts is not
going to work.

I've come up with the following plan.

Start reading in stars by file. After reading each file, get the
boundaries of each image ( they are rectangular ) and store them. For
each star, check whether it is within the region of images already
read. If it is, don't read it in. If it does not lie within the
regions already read, read it in.

So I need a way to find out if a point ( position of a star ) is
within a rectangle ( image boundary ). The rectangle edges are not
strictly horizontal or vertical.

I've found several methods of doing this, and can write a function.
But I can save some time if someone knows if there's already one
available out there.

Thanks.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: calling ANSYS Fluent from IDL
Next Topic: Youtube

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

Current Time: Wed Oct 08 14:56:57 PDT 2025

Total time taken to generate the page: 0.00364 seconds