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

📄 demodersrf.m

📁 非均匀有理B样条的matlab程序
💻 M
字号:
function demodersrf
% Demonstrates the construction of a general
% surface derivatives.
%

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

% make and draw a test surface
srf = nrbtestsrf;
p = nrbeval(srf,{linspace(0.0,1.0,20) linspace(0.0,1.0,20)});
h = surf(squeeze(p(1,:,:)),squeeze(p(2,:,:)),squeeze(p(3,:,:)));
set(h,'FaceColor','blue','EdgeColor','blue');
title('First derivatives over a test surface.');

npts = 5;
tt = linspace(0.0,1.0,npts);

dsrf = nrbderiv(srf);

[p1, dp] = nrbdeval(srf, dsrf, {tt, tt});

up2 = vecnorm(dp{1});
vp2 = vecnorm(dp{2});

hold on;
plot3(p1(1,:),p1(2,:),p1(3,:),'ro');
h1 = quiver3(p1(1,:),p1(2,:),p1(3,:),up2(1,:),up2(2,:),up2(3,:));
h2 = quiver3(p1(1,:),p1(2,:),p1(3,:),vp2(1,:),vp2(2,:),vp2(3,:));
set(h1,'Color','black');
set(h2,'Color','black');

hold off;

⌨️ 快捷键说明

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