demokntins.m

来自「强大的nurbs的工具箱 nurbs曲线」· M 代码 · 共 28 行

M
28
字号
function demokntins
% Demonstration of the knot insertion algorithm.
%

% D.M. Spink
% Copyright (c) 2000.

crv = nrbtestcrv;

% plot the control points
plot(crv.coefs(1,:),crv.coefs(2,:),'bo')
title('Knot insertion along test curve.');
hold on;
plot(crv.coefs(1,:),crv.coefs(2,:),'b--');

% draw nurbs curve
nrbplot(crv,48);

% insert new knots and plot new control points
icrv = nrbkntins(crv,[0.125 0.375 0.625 0.875] );
plot(icrv.coefs(1,:),icrv.coefs(2,:),'ro')
plot(icrv.coefs(1,:),icrv.coefs(2,:),'r--');

hold off;



⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?