Hi Arjen: For your information, I have figured out the final end phase logic where the polygon 2 split and polygon 1 are known not to intersect each other. "pointinpolygon" is fairly useless for sorting out the possibilities because it makes no distinction between the test point being definitely outside or near the border of the polygon, and my trial end phase implementations (not commmitted) had really messy logic trying to get around this limitation.
I have now decided on a much better approach. I plan to modify pointinpolygon (and also rename it pointnotinpolygon). The new version should return 0, 1, or 2 depending on whether the test point is definitely inside, near, or definitely outside the polygon border. Then the end phase logic boils down to 6 possible tests using pointnotinpolygon (for polygon 1 being inside, on border, or outside polygon 2 and vice versa) with a definite result (unless there is bad logic somewhere) of either no fill, fill polygon 2 split, or fill polygon 1. I am now confident of this end phase logic, and I hope to implement and thoroughly test it tomorrow (Thursday). More later. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel