Hi Phil,


> -----Original Message-----
> From: Phil Rosenberg [mailto:p.d.rosenb...@gmail.com]

>
> In this special case the three short sides are all approximately 2 Plplot 
> internal units
> long which fools the intersection test into thinking they are close to 
> parallel to the
> test line. See
> notpointinpolygon() and notcrossed() functions. These three lines are 
> therefore
> treated as non-intersectionctions even though the test line does intersect 
> one of
> them. Finally the fourth section is just long enough and the location is just 
> correct
> that the test line intersects it more than 2 pixels from each end. The result 
> is that
> the point in polygon test sees 1 intersection instead of two and incorrectly
> concludes that the bottom left corner is inside the polygon.
>
> The final item that causes the bug to manifest is that the polygon is 
> entirely outside
> of the plot area so no segments are drawable. The test that Plplot performs 
> to see
> if the whole plot needs filling is that the bottom left corner is inside the 
> fill polygon
> and all segments are outside the plot area. Hence the incorrect full fill.
>
> I'm still of the opinion that the notcrossed function should not use the 2 
> pixel
> fuzziness. At this point in the drawing we are dealing in integer pixels and 
> we need
> only an epsilon test I think. I think the best fix is to change this. There 
> are some
> sticking plaster solutions that would hide the problem but not really fix it 
> in my
> opinion. I would really like to change the notcrossed function unless anyone 
> has
> some really strong objections?
>
Thanks for constructing that example. This is the sort of things that makes 
"numerical geometry" an interesting topic ;). I have not studied the example in 
detail yet, but I am not entirely sure your proposed solution would work in all 
cases either. I will have a closer look.

Regards,

Arjen



DISCLAIMER: This message is intended exclusively for the addressee(s) and may 
contain confidential and privileged information. If you are not the intended 
recipient please notify the sender immediately and destroy this message. 
Unauthorized use, disclosure or copying of this message is strictly prohibited. 
The foundation 'Stichting Deltares', which has its seat at Delft, The 
Netherlands, Commercial Registration Number 41146461, is not liable in any way 
whatsoever for consequences and/or damages resulting from the improper, 
incomplete and untimely dispatch, receipt and/or content of this e-mail.
------------------------------------------------------------------------------
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to