analytics

Friday, September 5, 2014

2,2,2 Interpolation

Suppose you have a set of points and you want to find a smooth curve through them.

The dashed line is a sort of guess what it might look like, one of the points on it will be X somewhere between B and C.  First we find a parametric curve through points A,B,C called P[L,x] and P[L,y] with respect to t.
solve the above equations for the coefficients...
Plug these values for the coefficients back in the original equations...
Now plug in the actual values for A,B,C from the plot...
Let's look at the graph again...

So now for point X we consider the parametric equation going from D to C to B called P[R,x] and P[R,y] of t. The L and R are considering approaching point X form the left and from the right now as you can see. 

skipping a couple steps because it works the same the relevant part is...
and similarly
Now point X should be the average of t=.5 on all the P equations...
So we've found X...
All the points except between A and B and between E and F are found the same way. For the point between A and B we just have to use t=-.5 on P[L,x] and P[L,y] because that's the best information we have.

So once we've found all the points we'll have roughly twice as many points for our smooth curve, now we can repeat the process again on our new set of points and keep doubling the number of points until the curve is completely filled in down to the resolution we want.

**about the name**
I called it 2,2,2 interpolation because it uses a set of 2 2 dimensional parameterization's of degree 2 that are averaged to give 2 times the number of points. I suppose it could be taken to 3,3,3 and so on...

No comments:

Post a Comment