Update
This commit is contained in:
parent
55d3362bb2
commit
68f77b2118
10 changed files with 68 additions and 23 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
Interpolation (*inter* = between, *polio*= polish) means computing (usually a gradual) transition between some specified values, i.e. creating additional intermediate points between some already existing points. For example if we want to change a screen [pixel](pixel.dm) from one color to another in a gradual manner, we use some interpolation method to compute a number of intermediate colors which we then display in rapid succession; we say we interpolate between the two colors. Interpolation is a very basic [mathematical](math.md) tool that's commonly encountered almost everywhere, not just in [programming](programming.md): some uses include drawing a graph between measured data points, estimating function values in unknown regions, creating smooth [animations](animation.md), drawing [vector](vector_graphics.md) curves, [digital](digital.md) to [analog](analog.md) conversion, enlarging pictures, blending transition in videos and so on. Interpolation can be used to generalize, e.g. if we have a mathematical [function](function.md) that's only defined for [whole numbers](whole_number.md) (such as [factorial](factorial.md) or [Fibonacci sequence](fibonacci.md)), we may use interpolation to extend that function to all [real numbers](real_number.md). Interpolation can also be used as a method of [approximation](approximation.md) (consider e.g. a game that runs at 60 FPS to look smooth but internally only computes its physics at 30 FPS and interpolates every other frame so as to increase performance). All in all interpolation is one of the most important things to learn.
|
||||
|
||||
The opposite of interpolation is [extrapolation](extrapolation.md), an operation that's *extending*, creating points OUTSIDE given interval (while interpolation creates points INSIDE the interval).
|
||||
The opposite of interpolation is **[extrapolation](extrapolation.md)**, an operation that's *extending*, creating points OUTSIDE given interval (while interpolation creates points INSIDE the interval). Both interpolation and extrapolation are similar to **[regression](regression.md)** which tries to find a [function](function.md) of specified form that best fits given data (unlike interpolation it usually isn't required to hit the data points exactly but rather e.g. minimize some kind of distance to these points).
|
||||
|
||||
There are many methods of interpolation which differ in aspects such as complexity, number of dimensions, type and properties of the mathematical curve/surface ([polynomial](polynomial.md) degree, continuity/smoothness of [derivatives](derivative.md), ...) or number of points required for the computation (some methods require knowledge of more than two points).
|
||||
|
||||
|
@ -35,4 +35,9 @@ Many times we apply our interpolation not just to two points but to many points,
|
|||
|
||||
**[Cubic](cubic.md) interpolation** can be considered a bit more advanced, it uses a [polynomial](polynomial.md) of degree 3 and creates a nice smooth curve through multiple points but requires knowledge of one additional point on each side of the interpolated interval (this may create slight issues with the first and last point of the sequence of values). This is so as to know at what slope to approach an endpoint so as to continue in the direction of the point behind it.
|
||||
|
||||
The above mentioned methods can be generalized to more dimensions (the number of dimensions are equal to the number of interpolation parameters) -- we encounter this a lot e.g. in [computer graphics](graphics.md) when upscaling [textures](texture.md) (sometimes called texture filtering). 2D nearest neighbor interpolation creates "blocky" images in which [pixels](pixel.md) simply "get bigger" but stay sharp squares if we upscale the texture. Linear interpolation in 2D is called [bilinear interpolation](bilinear.md) and is visually much better than nearest neighbor, [bicubic interpolation](bicubic.md) is a generalization of cubic interpolation to 2D and is yet smoother that bilinear interpolation.
|
||||
The above mentioned methods can be generalized to more dimensions (the number of dimensions are equal to the number of interpolation parameters) -- we encounter this a lot e.g. in [computer graphics](graphics.md) when upscaling [textures](texture.md) (sometimes called texture filtering). 2D nearest neighbor interpolation creates "blocky" images in which [pixels](pixel.md) simply "get bigger" but stay sharp squares if we upscale the texture. Linear interpolation in 2D is called [bilinear interpolation](bilinear.md) and is visually much better than nearest neighbor, [bicubic interpolation](bicubic.md) is a generalization of cubic interpolation to 2D and is yet smoother that bilinear interpolation.
|
||||
|
||||
## See Also
|
||||
|
||||
- [extrapolation](extrapolation.md)
|
||||
- [regression](regression.md)
|
Loading…
Add table
Add a link
Reference in a new issue