plots [message #52829] |
Fri, 02 March 2007 04:01  |
ashraf
Messages: 4 Registered: March 2007
|
Junior Member |
|
|
Hello,
I have col and row coordinates of a polygon that I would like to plot
on an image using PLOTS function, but the data is noncontiguous, how
can I re-arrange the data so that it is contiguous, i.e. starting from
an arbitrary point on the polygon, the next point is the one coonected
to the first point say by moving anticlockwise and so on. Otherwise is
there another function in IDL that can plot noncontiguous data over an
image?
Thanks.
ashraf.
|
|
|
Re: plots [message #52917 is a reply to message #52829] |
Tue, 06 March 2007 08:07  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
ashraf writes:
> again I must strees that these are noncontiguous but discreet
> coordinates which form a closed polygon, for example let
> x = [0,1,1,0,0,2,2,2]
> y = [0,1,2,2,1,0,1,2]
> These points can be uniquely re-arranged as
> x = [0,1,2,2,2,1,0,0]
> y = [0,1,0,1,2,2,2,1]
> to form a closed non-intersecting outline. My question is how can I re-
> arrange these points effeciently?
Ashraf,
I think if you sit down with a piece of graph paper and
these points in front of you, it will not take you two
minutes to realize that you can easily build *at least*
two or three "unique" arrangements of points that form
closed non-intersecting outlines.
No amount of wishing will make this so. :-)
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.")
|
|
|