On 2011-04-24 15:53+0200 José Luis García Pallero wrote:

> Hello,
> Exist any code in PLplot to do polygon clipping involving concave
> polygons? Surfing the net I found (I need C code) GPC
> (http://www.cs.man.ac.uk/~toby/alan/software/), but it is not free
> software.

Hi José:

We have code that implements rectangular clipping of filled concave
polygons that occurs for standard example 25. Last year we discovered
there was a long-standing bug in that code so, in fact, example 25 had
not been filled correctly for years.  That is fixed now, but as a
result we have lost some confidence in the robustness of that code,
and Arjen has promised to implement at least one more really nasty
example to test that robustness more thoroughly.

In response to that robustness concern with the first clipped fill
algorithm, I implemented an entirely new approach.  It is heavily
documented recursive code to do the more general task of filling an
arbitrary simple (i.e., possibly concave, but not self-intersecting)
polygon using an arbitrary simple clipping region. That code is used
(see src/plfill.c) only if USE_FILL_INTERSECTION_POLYGON is defined
(which normally it isn't unless you set the _cmake_ option
-DUSE_FILL_INTERSECTION_POLYGON=ON). That variant of the code works
for many cases, but there are still some outstanding issues with near
intersections where one simple polygon touches but does not cross the
other. I had to suspend the work due to lack of time, but you are
obviously allowed by the LGPL (and also most welcome) to develop that
code (with USE_FILL_INTERSECTION_POLYGON #defined or not) further.

Good luck, and please let us know how it goes.

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
__________________________

------------------------------------------------------------------------------
Fulfilling the Lean Software Promise
Lean software platforms are now widely adopted and the benefits have been 
demonstrated beyond question. Learn why your peers are replacing JEE 
containers with lightweight application servers - and what you can gain 
from the move. http://p.sf.net/sfu/vmware-sfemails
_______________________________________________
Plplot-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plplot-general

Reply via email to