Lagrange-Kurve



  • Hi,

    ich versuche gerade folgenden Quelltext zu verstehen, doch leider kann ich mir die Herleitung des Lagrangepolynoms nicht erklären:

    /// <param name="i">selects the blending function for the i-th control point</param>
    /// <param name="n">degree of blending function ( points.count - 1 )</param>
    /// <param name="t">curve position [0..degree]</param>
    /// <returns>weight of the i-th control point at position t</returns>
    public override double BlendingFunction(int i, int n, double t){
    
    double LagCur = 1;
    
    for (int j = 0; j <= n; j++)
    if (i != j) LagCur = LagCur * (t - j) / (i - j); //
    
    return LagCur;         
    }
    


  • Das hat nichts mit "herleiten" zu tun, sondern die Lagrange-Polynonme sind einfach so definiert: http://de.wikipedia.org/wiki/Lagrange-Polynom


Anmelden zum Antworten