On 2009-11-27 11:19-0800 Alan W. Irwin wrote: > If you run > > examples/c/x16c -dev xwin -exclude -nx 20 -ny 20 > > a smooth donut is excluded from the 5th page (as expected, since years ago > Rafael modified the defined algorithm for plshade(s) to give smooth edges > using some sort of iterative technique). However, if you use > coarser resolutions, e.g., > > examples/c/x16c -dev xwin -exclude -nx 10 -ny 10 > > Rafael's iteration sometimes still gives reasonably good results (some edges > of the donut are smooth) at coarser resolutions but also sometimes gives > horrible results (the edges of the donut are extremely misplaced or missing > altogether). I interpret these results as a numerical robustness issue (a > starting solution that is so bad that it cannot converge, or a convergence > criterion that stops the iteration before it has converged).
I have looked into this further. Rafael's iteration technique (routine bisect in plshade.c) for finding the edge of defined regions is the bisection method. According to Numerical Recipes, Chapter 9.1, bracketing issues can be important for the bisection method (especially for our gradient use case where multiple solutions for finding the edge of complicated polygons can exist). So my next planned step with this bug is to put in the bracketing logic suggested by Numerical Recipes that currently does not exist for our bisection implementation. That change should be fairly straightforward but nontrivial. So its on my gradient ToDo list, but I am going to put off doing it for a while since the software fallback with 20x20 resolution to work around this edge finding bug is "good enough" for now, and there are more interesting gradient things to do at the moment (such as implementing gradients for some of our devices [e.g., svg, qt, cairo] that have that native capability). 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 __________________________ ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel