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

Home » Public Forums » archive » Polygon filling oddities
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: Polygon filling oddities [message #27065 is a reply to message #26946] Thu, 04 October 2001 18:14 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Mark Hadfield (m.hadfield@niwa.cri.nz) writes:

>> I can reproduce your results. But I can also
>> get the PolyFillV code to work by making this
>> change:
>>
>> p = polyfillv(0 > x < (!D.X_Size-1), 0 > y < (!D.Y_Size-1), 500, 500)
>
> Two comments/questions:
>
> 1. Do you think you need !D.X_Size and !D.Y_Size in there? What has the
> current graphics device got to do with it? (Not arguing just curious.)

Oh, I was trying to be general. But 10 milliseconds
after I hit the Send button I realized there wasn't
much point with those damn 500s in there. :-)

In this case "499" would have worked just as
well, and would maybe have been clearer too.


> 2. Clipping x and y before calculating the filled polygon generally won't
> give the same answer as clipping the polygon, at least not when the vertex
> spacing is large. Eg think of replacing the circle in my example with a
> triangle.

Humm. I guess you're right. You might have to
do some interpolation in this case. Although,
in practice I've never worked with objects
where this mattered much.

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Previous Topic: Can you drag and drop a Windows file into a Draw Widget?
Next Topic: the precision of PRINT and HELP statements

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

Current Time: Wed Dec 03 13:46:42 PST 2025

Total time taken to generate the page: 0.40089 seconds