On 2008-03-13 16:54+0100 Paul Wellner Bou wrote:

> Hello,
>
> as you might have seen, after some days of trying around I am now able
> to create a regular grid with griddata().
>
> Now, using griddata, I have to decide which gridding algorithm to use.
> As I used the delauny triangulation method in Matlab before, I would
> like to use this one with Plplot, too.
>
> But using GRID_DTLI (Delaunay Triangulation Linear Interpolation) I get
> a regular grid full of NaNs. Thats fine, but not what I need.
>
> As the cubic spline method is another possible way to get "good" data, I
> tried this one, too. I get a half NaN matrix. The rest of the values are ok.
>
> The linear interpolation algorithm is too bad for my case.
>
> Well, my data is from a wavefront tracing through an eye glass blank. So
> the result points (x, y, z) in the x-y-layer are those:
> http://m21s26.vlinux.de/math/datapoints.png
> So I would understand if there are a lot of NaNs around the data.

Since your pattern of points is confined to a circular area (and rather
complete within that area), my suggestion is to try using polar coordinates
throughout.  Now example 21 obviously uses rectangular coordinates for
plgriddata, but I presume plgriddata should work just as it is for any
two-dimensional coordinate system.  Furthermore, example 16's last page (see
http://plplot.sourceforge.net/examples-data/demo16/x16.05.png) shows
plshades can be used with any two-dimensional coordinate system.

>
> Is there a way to use the DTLI algorithm to get a kind of data like in
> http://m21s26.vlinux.de/math/gsg.png?

I think yes.  Once you get plgriddata and plshades working for polar
coordinates it should be a simple matter to use plbox to make a rectangular
box around the circular area created by plshades.  You can arrange the plbox
call so the tick marks on the box are for rectangular coordinates
corresponding to the polar coordinates used for plshades.

Good luck with the polar-coordinate implementation along the lines I have
suggested.

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: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Plplot-general mailing list
Plplot-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-general

Reply via email to