# Interpolation between lines

1. Jan 4, 2013

### musk

Hi there.
I have a problem regarding interpolation between lines. I have to say that I have never done it before and I can't find relevant info on the internet, so I am asking for your help. the graph in question can be found here:

http://s9.postimage.org/kmj94nexb/physicsforum.png

I do not have any other info other than the X and Y value that I calculate beforehand. When I insert them on the diagram I get a point and if it falls on one of the curves already on the graph, then it's all OK, I read the value of the curve and can proceed with my calculations. Otherwise, I have to interpolate somehow, so the only info I would have is that point I get from the intersection of X and Y, which has to be part of the new (interpolated) curve.

For example I have curves 0,8 and 0,9 and I want to get 0,86. I also have to take into consideration the fact that Y is expressed as log.

I hope I explained it well enough...thank you.

2. Jan 4, 2013

### haruspex

I'm not quite sure which way you're trying to use the graph. Are you trying to find the curve label from x and y, or an x value given a curve and y? Or maybe you want to do all three ways?
Whichever, looks to me that the awkward part is the very nonlinear relationship between curve label and curve position. You will need to find a formula that approximates this. I would turn the dataset around so that I have one curve corresponding to each vertical grating line on your graph, with the y values being the curve labels on your graph. Then run some sort of curve fitting to see if I could find a formula.

3. Jan 4, 2013

### SteamKing

Staff Emeritus
What you have is essentially a 2-D representation of a 3-D surface.
One way to approach you problem is to read values of y for constant x at each of the level curves on your original graph. Then, you can draw a graph of y versus the values of the level curves. Enter this second graph with the value of the level curve desired (the 0.86 value from your OP) and determine the y value you desire.

4. Jan 4, 2013

### haruspex

As I said, the behaviour as a function of curve label is highly nonlinear. I would say the curve spacing is too great for a simple linear interpolation.

5. Jan 4, 2013

### SteamKing

Staff Emeritus
Once you have a curve at constant x, then you can evaluate which method would work best to find the y-value for a particular level surface value.