<< base2dec | Elementary functions | bin2dec >> |
B = bernsteinMatrix(n, t) |
nonnegative integer: Approximation order.
number or vector: Evaluation point.
Bernstein Matrix: length(t) - by - n+1 matrix.
B = bernsteinMatrix(n, t) constructs a Bernstein matrix B 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.
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))
Version | Description |
---|---|
1.5.0 | initial version |
Allan CORNET