背景
函数原型
function [Ph, Uh] = reduce_degree_to_cubic(P, U, p, TOL)
% INPUT
% P - the control points of B-spline curve, P = [P(0), ..., P(n)]
% U - the knot-vector of B-spline curve, U = [u(0), ..., u(m)]
% p - the degree of spline
%
% OUTPUT
% Ph - the control points of degree-reduced B-spline curve (cubic spline, p=3)
% Uh - the knot-vector of degree-reduced B-spline curve
work_size = 30000;
[Ph, Uh] = degree_reduce_impl(P, U, p, TOL, work_size);
end
实例展示
视频展示
基于MATLAB的B样条曲线降阶(基于3次样条+逼近理论)