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] = 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;
}