calcRationalCurveDerivatives function
dynamic
calcRationalCurveDerivatives(
- dynamic Pders
Implementation
calcRationalCurveDerivatives( Pders ) {
var nd = Pders.length;
var Aders = [];
var wders = [];
for ( var i = 0; i < nd; ++ i ) {
var point = Pders[ i ];
Aders[ i ] = new Vector3( point.x, point.y, point.z );
wders[ i ] = point.w;
}
var CK = [];
for ( var k = 0; k < nd; ++ k ) {
var v = Aders[ k ].clone();
for ( var i = 1; i <= k; ++ i ) {
v.sub( CK[ k - i ].clone().multiplyScalar( calcKoverI( k, i ) * wders[ i ] ) );
}
CK[ k ] = v.divideScalar( wders[ 0 ] );
}
return CK;
}