Функция кривой Beziere
/**
* @function getPoint
* @param {number} t the time value between 0 and 1
* @returns {Vector} the point at the time value
* @memberof BezierCurve
*/
function getPoint(t: number): Vector {
const x = (1 - t) * (1 - t) * this.p0.x + 2 * t * (1 - t) * this.p1.x + t * t * this.p2.x;
const y = (1 - t) * (1 - t) * this.p0.y + 2 * t * (1 - t) * this.p1.y + t * t * this.p2.y;
return new Vector(x, y);
}
Himanshu Jangid