[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gsl] interpolation function

From: Michael Ng
Subject: Re: [Bug-gsl] interpolation function
Date: Sun, 29 Mar 2009 12:27:09 +0100
User-agent: Thunderbird (Windows/20090302)

Thanks Brian. I have found a solution to my problem. Basically, when two lines intersect (LineA is a flat line and LineB is a slanted line) at a given y-coordinate, instead of getting the x-coordinate from interpolation in LineA (my old problematic approach) I simply get the x-coordinate from interpolation in LineB (new approach). Hence, in this case, the initial problem is solved. In fact, it is not possible to get a specific x-coordinate from a flat line, since all x-coordinates has the same y-coordinate!

Thanks for your help.
Michael Ng

Brian Gough wrote:
At Fri, 27 Mar 2009 00:25:28 +0000,
Michael Ng wrote:
Dear gurus,
I am using the following function to get interpolation points in a 3D surface. I am doing it for the sake of finding the intersection line between two surfaces:

    gsl_spline_eval(spline, x, acc);

Unfortunately, the abave line failed to work when the data 'x' is a constant, since it is from a flat surface. I understand that x has to be in ascending order, but I hope to find a quick fix when x is a constant...

As you say x must be increasing, so the only way is to remove any
equal points before doing the interpolation.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]