From: Joao C. <jc...@fe...> - 2003-02-28 01:01:38
|
On Thursday 27 February 2003 23:11, Alan W. Irwin wrote: > On Thu, 27 Feb 2003, [iso-8859-1] Jo=E3o Cardoso wrote: > > My question is if we should not abandon the bug fix release, and take > > the April opportunity to make a new real release instead. > > I agree 100 per cent with Rafael's response on this question. What is = in > CVS at release time defines whether the release is bug-fix or not. > > > [...]I have a new API > > entry to submit. It's an utility function to grid data, removing the > > limitation that our 3D data plots have of using regularly sampled dat= a. > > How does this compare with the pltr1 and pltr2 interpolation that alrea= dy > exists for the plcont and plshade(s) part of our 3D API? I don't mind > adding an additional interpolation scheme possibility so long as it > can be used in the same way pltr1 and pltr2 are used now. I didn't take the approach of provinding another pltr*(). Instead, if the user has irregularly sampled data he must call plgriddata= () to=20 obtain gridded data; after that he can use the usual 3D data APIs, whatev= er=20 they are, from plshade() to plot3d(), plsurf3d() or whatsoever. That's why I call plgriddata() an utility function, as the user can use i= ts=20 own gridding algorithm instead. This is the relevant plplot.h section: /* grid irregularly sampled data */ void plgriddata(PLFLT *x, PLFLT *y, PLFLT *z, int npts, =09 PLFLT *xg, int nptsx, PLFLT *yg, int nptsy, =09 PLFLT **zg, int type, PLFLT data); /* type of gridding algorithm for plgriddata() */ #define GRID_CSA 1 /* Bivariate Cubic Spline approximation */ #define GRID_DTLI 2 /* Delaunay Triangulation Linear Interpolation */ #define GRID_NNI 3 /* Natural Neighbors Interpolation */ #define GRID_NNIDW 4 /* Nearest Neighbors Inverse Distance Weighted */ #define GRID_NNLI 5 /* Nearest Neighbors Linear Interpolation */ #define GRID_NNAIDW 6 /* Nearest Neighbors Around Inverse Distance Weight= ed =20 */ GRID_CSA uses libcsa, GRID_DTLI and GRID_NNI uses nn (that uses Qhull), = while=20 GRID_NNIDW, GRID_NNLI and GRID_NNAIDW are implemented in plgriddata.c. x, y and z are ntps sized input arrays; xg[ntpsx] and yg[ntpsy] define th= e=20 desired grid size and spacing, while zg[nptsx][nptsy] is the output gridd= ed=20 data. > A related issue is this may be a good opportunity to generalize our > argument lists for all our 3D functions. For now plcont and plshades al= low > PLcGrid or PLcGrid2 style arguments to pass the x,y information and > interpolate with pltr1, pltr2, or any other interpolation function > specified by the user. Those arguments have enough generality so that t= he > x,y surface can be irregular in shape (something I need for my research= for > all the 3D API). Thus, I would like to see the plcont and plshade(s) sc= heme > for passing the x,y information adopted for plsurf3d and the rest of ou= r 3D > API. I really don't want to mess with some plot functions internals. Often the= y=20 were designed with a certain objective in mind, and changing them with=20 another objective can turns the code confusing. This does not means that it can't be done, perhaps in an elegant way, I d= on't=20 know, as I never looked at them from that perspective. > This additional facility should, of course, be implemented as added API > rather than changed API. There is certainly a place for simple 3D API > calls where x and y appear as separate arrays rather than as part of a > PLcGrid or PLcGrid2 structure. But I (and presumably many other users) > need the other more general alternative as well. To be blunt about thi= s, > gnuplot has allowed irregular shaped x,y domains for all their 3D API s= ince > 1996, and I think it is long past time that PLplot caught up. I don't know how gnuplot does it internally, I only know that irregular=20 gridded data is allowed. Joao > > Alan > __________________________ > Alan W. Irwin > email: ir...@be... > phone: 250-727-2902 > > Astronomical research affiliation with Department of Physics and Astron= omy, > University of Victoria (astrowww.phys.uvic.ca). > > Programming affiliations with the Canadian Centre for Climate Modelling= and > Analysis (www.cccma.bc.ec.gc.ca) and the PLplot scientific plotting > software package (plplot.org). > > __________________________ > > Linux-powered Science > __________________________ > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Plplot-devel mailing list > Plp...@li... > https://lists.sourceforge.net/lists/listinfo/plplot-devel |