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

Home » Public Forums » archive » Re: clipping with polyfill
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: clipping with polyfill [message #29945 is a reply to message #29925] Tue, 26 March 2002 13:56 Go to previous messageGo to previous message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
"David Fanning" <david@dfanning.com> wrote in message
news:MPG.170a8e0a84f81cef989850@news.frii.com...
> James Kuyper (kuyper@gscmail.gsfc.nasa.gov) writes:
>
>> It seems to me that this does the right thing only when the edges
>> of the polygon that are clipped are perpendicular to the clipping
>> boundary. Otherwise, it changes the orientation of those edges.
>
> Right, that's what all that replacement nonsense I wrote before was
> about. If the clipping place is not exactly on a data boundary, the
> edges of the polygon will be off and you will have to replace the
> data value with the clipping value. You will have to interpolate,
> essentially. :-)

I haven't been following this thread very closely, but are you talking
about clipping a polygon to a rectangular region? If so my
MGH_POLYCLIP might be of use. It clips a 2D polygon to a vertical or
horizontal line. Apply it four times to clip to a box. As explained in
the header, it's based on a function of JD's but I did some
performance tuning (and changed the name to annoy him). See:

http://katipo.niwa.cri.nz/~hadfield/gust/software/idl/

--
Mark Hadfield
m.hadfield@niwa.co.nz Ka puwaha et tai nei
http://katipo.niwa.co.nz/~hadfield Hoea tatou
National Institute for Water and Atmospheric Research (NIWA)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Leaking objects...
Next Topic: Re: Vector Graphics in IDL?

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

Current Time: Sun Oct 12 05:33:38 PDT 2025

Total time taken to generate the page: 2.08021 seconds