% 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 |