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

Home » Public Forums » archive » POLYFILLV question
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
POLYFILLV question [message #19598] Fri, 31 March 2000 00:00
Daniel Peduzzi is currently offline  Daniel Peduzzi
Messages: 29
Registered: June 1999
Junior Member
I've been trying to use the polyfillv routine to fill a simple rectangle.
After passing in the corner indices of the rectangle, I realized that the
returned 1D indices did not include all the edges in which the corner
indices lie, as illustrated by the sample program below:

;=========================================================
pro polytest

xsize = 10
ysize = 10

; Fill an xsize by ysize array with one's.
a = bytarr(10, 10) + 1

; Make an ROI which takes up the entire array
x = [0, xsize-1, xsize-1, 0, 0] ; x-indices
y = [ysize-1, ysize-1, 0, 0, ysize-1] ; y-indices
ind = polyfillv(x, y, xsize, ysize)

a[ind] = 0
print,a

return
end
;=========================================================

The above program yields the following output:

0 0 0 0 0 0 0 0 0 1
0 0 0 0 0 0 0 0 0 1
0 0 0 0 0 0 0 0 0 1
0 0 0 0 0 0 0 0 0 1
0 0 0 0 0 0 0 0 0 1
0 0 0 0 0 0 0 0 0 1
0 0 0 0 0 0 0 0 0 1
0 0 0 0 0 0 0 0 0 1
0 0 0 0 0 0 0 0 0 1
1 1 1 1 1 1 1 1 1 1


What I really need is for polyfillv to return the indices of the
outline AND interior points of the rectangle. Is there a way to
coerce pollyfillv into doing this? Or am I doing something wrong?

If not, does somebody have a routine that will return all interior
and edge indices of a polygon?

--------------------------------------------
Dan Peduzzi
peduzzi@mediaone.net
--------------------------------------------
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Unwrapping routine
Next Topic: Re: Q:how to use MESH_OBJ

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

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

Total time taken to generate the page: 0.00506 seconds