Fast Bezier Curves

版本 1.0.0 (1.9 KB) 作者: Moreno, M.
Evaluates a Bezier curve given its control points and knot vector or resolution.
4.0 次下载
更新时间 2024/11/7

查看许可证

% Generate control points
x = rand(5, 2);
% Evaluate Bezier uniformly
[y, b] = bez(x, 100); % Export binomial coefficients
% Evaluate Bezier at knots
z = bez(x, rand(5, 1), b); % Recycle binomial calculation
% Plot results
figure
hold on
plot(y(:, 1), y(:, 2), 'LineWidth', 1.5)
plot(z(:, 1), z(:, 2), 'o', 'LineWidth', 1.2, 'MarkerFaceColor', 'w')
plot(x(:, 1), x(:, 2), '.-', 'LineWidth', 1, 'MarkerSize', 12)
fprintf('Binomial coefficient: [%d %d %d %d %d]\n', b.')

引用格式

Moreno, M. (2024). Fast Bezier Curves (https://www.mathworks.com/matlabcentral/fileexchange/175205-fast-bezier-curves), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2024b
兼容任何版本
平台兼容性
Windows macOS Linux
标签 添加标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

版本 已发布 发行说明
1.0.0