Smooth Interpolation between two points
<p>i am trying to interpolate in a mesh between points. I did some research and found few solutions, but all of them produce weird results for me. I tried Cosinus and Cubic interpolation, but whole mesh gets tiny waves in it instead of being smooth.</p>

<p>I tried this</p>

<pre><code> mu2 = mu*mu;
   a0 = y3 - y2 - y0 + y1;
   a1 = y0 - y1 - a0;
   a2 = y2 - y0;
   a3 = y1;

   return(a0*mu*mu2+a1*mu2+a2*mu+a3);
</code></pre>

<p>from here : <a href="http://paulbourke.net/miscellaneous/interpolation/" rel="nofollow">http://paulbourke.net/miscellaneous/interpolation/</a></p>

<p>i got all the points i need and all should be working, but it isnt. I spent a lot of time debugging it and only thing i found to be a problem is that it seems that mu ( regular t from 0.0 - 1.0 in interpolation ) starts at 0.0 at P1 as it should, but at 1.0 it is at P3, while it should be at P2 ( points P0, P1, P2, P3, where interpolation should happen between P1 and P2 )</p>

<p>If there is any other better simple way how to do interpolation between two points, please let me know. I dont want to do bezier curves or anything like that with controls points. I just have two points and i can use one more point on each side like in the example above.</p>

<p>Thanks for any help
Luke</p>