立方/五次线性插值

3
以下是线性插值函数:
float lerp (float a, float b, float weight) {
    return a + weight * (b - a);
}

下面是一个三次插值函数:
float cubic (float p1, float p2, float p3, float p4, float weight) {
    float m = weight * weight;
    float a = p4 - p3 - p1 + p2;
    float b = p1 - p2 - a;
    float c = p3 - p1;
    float d = p2;
    return a * weight * m + b * m + c * weight + d;    
}

以下方法的名称是什么?
float lerp (float a, float b, float weight) {
    float v = weight * weigth * (3.0f - 2.0f * weight);
    return a + v * (b - a);
}

我看到一些人将上述方法称为“三次样条插值”,但是对我来说,三次样条插值需要4个点。

此外,我也见过以下内容:

float lerp (float a, float b, float weight) {
    float v = weight * weight * weight * (weight * (weight * 6.0f - 15.0f) + 10.0f);
    return a + v * (b - a);
}

上述代码被称为“五次函数”,但我不确定这些函数如何在没有必要的附加“点”的情况下成为“三次函数”和“五次函数”。
这些操作在“权重”上执行的名称是什么?
float v = weight * weigth * (3.0f - 2.0f * weight);
float v = weight * weight * weight  * (weight  * (weight * 6.0f - 15.0f) + 10.0f);
1个回答

3

"立方多项式"是“三次多项式”的另一个说法。

"五次多项式"是“五次多项式”的另一个说法。

参数的数量并不重要。即使没有参数,P(x) = x*x*x也是“立方多项式”。

What is the name of these operations performed on the "weights"?

...
这些函数被称为"平滑步进函数"。平滑步进函数是一类奇次多项式。第一个是三次(或“立方体”)平滑步进函数,第二个是五次(或“五次方程”)平滑步进函数。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接