📄 beziervalue.m
字号:
%Bezier general function
%plot in 51 points
function value=Beziervalue(P,u)
%number of plotting points
pointsize=size(P); %get the points decides the number of bases 4=5-1 and dimension;
len=pointsize(1); %the group of control points 5
dimension=pointsize(2); %the dimension of points 2D or 3D
n=len-1;
value=zeros(1,dimension);
for k=0:n %the number of bases
value=value+P(k+1,:).*nchoosek(n,k).*(u^k).*((1-u)^(n-k));
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -