MedicalVisualization
Interpolation
← Data Representation | ● | Discrete Data →
The discrete representation requires the interpolation of function values f(xi)=yi at the data grid points xi.
Interpolation can be (from worst to best)
- linear
- cubic
- spline
- sinc
Linearily interpolated function f(x) between function values y1 und y2 of two data points x1 und x2 with interpolation weight (factor) w∈[0..1],w=x−x1x2−x1:
f(x)=(1−w)⋅y1+w⋅y2
Cubically interpolated function:
f(x)=ax3+bx2+cx+d
f(xi)=yi,i=0..3
for xi=i−1, the cubic coefficients a, b, c and d are:
a=(y3−y2)−(y0−y1)
b=(y0−y1)−a
c=y2−y0
d=y1
faster evaluation of f(x):
f(x)=d+(c+(b+ax)x)x
← Data Representation | ● | Discrete Data →