3D Interpolation returning NaN

Hi Bill,

Thank you for the warning below. Here is a shorter copy of my previous mail
with some Java files attached to it (in a zip format).

Regards,
Sebastien


>Hi Sebastien,
>
>I'm afraid our dumb majordomo bounced your message for being
>too long. Can you please resend, and put any big files on a
>server with just the URL in the message.
>
>Thanks,
>Bill
>----------------------------------------------------------
>Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI  53706
>hibbard@xxxxxxxxxxxxxxxxx  608-263-4427  fax: 608-263-6738
>http://www.ssec.wisc.edu/~billh/vis.html


Dear all,

I don't know if I am asking too much, but maybe someone from the
mailing-list will be able to help me...

I work on a Java software project where we need to do some 2D and
3D-interpolation computation. Since we are not expert in Geometrical
computing we decided to use the excellent VisaD API (no need to try to
duplicate what has already been done!!!). To facilitate the work of my
colleagues, I also developed some wrapper classes of the interpolation
functions of VisaD. These 2 classes Interpolation2DLinear and
Interpolation3DLinear are available below with two other classes (if someone
is interested). The classes are fairly easy to use...

One constructs a function v[] = F(x[],y[],z[]) like this :
Interpolation3DLinear my_interp = new Interpolation3DLinear(x[],y[],z[],v[])
One computes the interpolation at (xi,yi,zi) like this :
my_interp.evaluate(xi,yi,zi)

All data are arrays of double  and double (see source of the classes). Data
are scaled before interpolation to avoid unit problems...

So we recently tested the wrapper and did some comparison with the
interpolation functionality of Matlab 6. For small function (i.e. functions
defined by a small sample of scattered points), the results were identical
and I was really happy about that... until one of my colleague wrote a test
file DataFitTest3dGridloss.java (available below) which tests
Interpolation3DLinear with a function sampled on a lot of points...

The test file performs interpolation on 168 points of the domain and all of
them except 1 returns NaN. We compared the only numerical result from
Interpolation3DLinear with Matlab and the values are different... Does
anyone knows about such a phenomenon? Is there a limit in the number of
points a Irregular3DSet can take??? Is there any geometrical restriction on
the set of points for Irregular3DSet ??? Am I doing something wrong (I
suppose so, but I can't find what it is)...

I would grateful if someone could help me... ...propose some possible
explanations ...or even just reproduce the problem...


Regards,
Sebastien

Attachment: dataFit.zip
Description: Zip compressed data

  • 2001 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: