Math 三次/五次线性插值

Math 三次/五次线性插值,math,interpolation,Math,Interpolation,以下是线性插值函数: 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 -

以下是线性插值函数:

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) {
    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);
}
上面的代码被称为“五次型”,但我不确定在没有必要的额外“点”的情况下,这些函数怎么可能是“三次型”和“五次型”

对“权重”执行的这些操作的名称是什么

是“三次多项式”的另一个词

是“五次多项式”的另一个词

参数的数量无关紧要
P(x)=x*x*x
是一个“三次”多项式,即使没有参数

对“权重”执行的这些操作的名称是什么

这些函数称为。Smoothstep函数是一系列奇数次多项式。第一个是3度(或“立方”)平滑步,第二个是5度(或“五次”)平滑步