⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 nrbreverse.m

📁 强大的nurbs的工具箱 nurbs曲线
💻 M
字号:
function rnrb = nrbreverse(nrb)
%
% Function Name:
% 
%   nrbreverse - Reverse the evaluation direction of a NURBS curve or surface.
% 
% Calling Sequence:
% 
%   rnrb = nrbreverse(nrb);
% 
% Parameters:
% 
%   nrb		: NURBS data structure, see nrbmak.
% 
%   rnrb		: Reversed NURBS.
% 
% Description:
% 
%   Utility function to reverse the evaluation direction of a NURBS
%   curve or surface.

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

if nargin ~= 1
  error('Incorrect number of input arguments');
end

if iscell(nrb.knots)

  % reverse a NURBS surface
  coefs = nrb.coefs(:,:,end:-1:1);
  rnrb = nrbmak(coefs(:,end:-1:1,:), {1.0-fliplr(nrb.knots{1}),...
                1.0-fliplr(nrb.knots{2})});           

else

  % reverse a NURBS curve
  rnrb = nrbmak(fliplr(nrb.coefs), 1.0-fliplr(nrb.knots));

end

⌨️ 快捷键说明

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