## [429088]: kwave / doc / interpolation.html Maximize Restore History

### interpolation.html    59 lines (52 with data), 3.4 kB

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55``` ``` Types of Interpolation

Short introduction into Interpolation

This part of help documentation was last updated on August. 26, 1998 for kwave 0.29 alpha

To interpolate means, to find a rule to create points in between a given set of points based on a rule. Kwave supports different types of interpolation (rules).

The most simple one is the linear Interpolation.

The linear interpolation connects all dots through a line. All points on the line define the points in between. This provides a statistical most errorfree interpolation, but does not provide a smooth function, that may be desirable for audio purposes ( )

A little bit more complex is the polynomial interpolation.

The rule is to find a polynom that goes though all the given points. Based on the function of the polynom the points in between are calculated. This has some disadvantages.

When changing one point, the whole interpolation function is affected, an effect that may not be desired. Here is an example that demonstrates this effect. The red point was moved, and a new was function interpolated. Both functions differ slightly at every point, but the given ones, only becauseone value was changed!

Furthermore the polynomial function is smooth, but does describe a rather long way. It oscillates around the given points. An interpolation rule (the cubic spline interpolation) that keeps closer to the points, while staying smooth will be introduced later

To be able to adjust one point, while leaving the rest of the interpolation untouched, one has take to a few points interpolate them, then take the next ones, and so on. This has been implemented in the piecewise polynomial interpolation, that takes 3 (5 or 7) points, interpolates them, but adds to the function only the interpolation between the first and the second point. Here follows an example for a 3rd order polynom. The red line is the unseen part of the interpolation starting at the point before the red one.

You can also see, that this solution has a flaw. You don't get a smooth function, because the interpolated pieces don't fit together all the times. So perhaps there should be a found a rule, that allows to fit them together.

The cubic spline interpolation does this. It calcuates a derrivative at the end points of the piecewise interpolation and assures the derrivative is equal for both pieces of interpolation. This minimizes the statistical function error while still obtaining a smooth function. The advantage of local editing still exists.

One way to obtain derrivation of a point would be to take the two nearest point, draw a line through them, and then take the derrivation of this line.

The next interpolation is again a rather simple one. It keeps the function on the value of the last point until a new point is given. This provides none of the above discussed properties, while still being useful for some effects or models. (for example a function of Pitch).

Go back to Main Help Page ```