Bernstein matrix
B = bernsteinMatrix(n, t)
n - nonnegative integer: Approximation order.
t - number or vector: Evaluation point.
B - Bernstein Matrix: length(t) - by - n+1 matrix.
B = bernsteinMatrix(n, t) constructs a Bernstein matrixB with dimensions length(t) - by - (n+1), where t is a vector.
The Bernstein matrix is also referred to as the Bezier matrix.
This function can be utilized to calculate the points of a Bezier curve.
1.5.0
initial version
Last updated 2 months ago
t = 0:1/100:1; B = bernsteinMatrix(3, t); P = [0 0 0; 1 2 1; 1 -2 3; 5 2 4]; bezierCurve = B * P; plot3(bezierCurve(:,1), bezierCurve(:,2), bezierCurve(:,3))