This is a roll-up of all previous PLplot patches related to supporting arbitrary storage of 2D user data. This patch is based on (and should apply cleanly to) svn/trunk r10859.
Adds support for arbitrary storage of 2D user data. This is very similar to the technique employed by some existing functions (e.g. plfcont and plfshade) that use "evaluator" functions to access 2D user data that is stored in an arbtrary format. The new approach extends the concept of a user-supplied (or predefined) "evaluator" function to a group of user-supplied (or predefined) "operator" functions. The operator functions provide for various operations on the arbitrarily stored 2D data including: get, set, +=, -=, *=, /=, isnan, minmax, and f2eval. To facilitate the passing of an entire family of operator functions (via function pointers), a plf2ops_t structure is defined to contain a pointer to each type of operator function. Predefined operator functions are defined for several common 2D data storage techniques. Variables (of type plf2ops_t) containing function pointers for these operator functions are also defined. New variants of functions that accept 2D data are created. The new variants accept the 2D data as two parameters: a pointer to a plf2ops_t structure containing (pointers to) suitable operator functions and a PLPointer to the actual 2D data store. Existing functions that accept 2D data are modified to simply pass their parameters to the corresponding new variant of the function, along with a pointer to the suitable predefined plf2ops_t stucture of operator function pointers. The list of functions for which new variants are created is: c_plimage, c_plimagefr, c_plmesh, c_plmeshc, c_plot3d, c_plot3dc, c_plot3dcl, c_plshade1, c_plshades, c_plsurf3d, and c_plsurf3dl, and c_plgriddata. The new variants are named the same as their corresponding existing function except that the "c_" prefix is changed to "plf" (e.g. the new variant of c_plmesh is called plfmesh). Adds plfvect declaration to plplot.h and changes the names (and only the names) of some plfvect arguments to make them slightly clearer. In order to maintain backwards API compatibility, this function and the other existing functions that use "evaluator" functions are NOT changed to use the new operator functions. Makes plplot.h and libplplot consistent vis-a-vis pltr0f and pltr2d. Moves the definitions of pltr2f (already declared in plplot.h) from the sccont.c files of the FORTRAN 77 and Fortran 95 bindings into plcont.c. Removes pltr0f declaration from plplot.h. Changes x08c.c to demonstrate use of new support for arbitrary storage of 2D data arrays. Shows how to do surface plots with the following four types of 2D data arrays: 1) PLFLT z[nx][ny]; 2) PLfGrid2 z; 3) PLFLT z[nx*ny]; /* row major order */ 4) PLFLT z[nx*ny]; /* column major order */ --- bindings/f77/sccont.c | 182 --------------------- bindings/f95/sccont.c | 182 --------------------- examples/c/x08c.c | 45 ++++-- include/plplot.h | 238 ++++++++++++++++++++++++++-- src/CMakeLists.txt | 1 + src/plcont.c | 207 +++++++++++++++++++++++-src/plf2ops.c | 426 +++++++++++++++++++++++++++++++++++++++ ++++++++++
src/plgridd.c | 120 ++++++++------ src/plimage.c | 49 +++++-- src/plot3d.c | 212 ++++++++++++++++--------- src/plshade.c | 81 ++++++++-- src/plvect.c | 17 +-- 12 files changed, 1200 insertions(+), 560 deletions(-) create mode 100644 src/plf2ops.c
0001-Support-arbitrary-storage-of-2D-user-data.patch.gz
Description: GNU Zip compressed data
------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev
_______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel