MATLAB 三维网图的高级处理

图就不贴了,自己写写代码运行吧


clc,close all , clear all 
%% 消隐处理
figure(1);
z = peaks(50);
subplot(2,1,1);
mesh(z);
title('消隐前的网图');
hidden off
subplot(2,1,2);
mesh(z);
title('消隐后的网图');
hidden on
colormap([0 0 1]);

%% 裁剪处理
figure(2);
P = peaks(30);
subplot(2,1,1);
mesh(P);
title('裁剪前的网图');
subplot(2,1,2);
P(20:23,9:15) = NaN*ones(4,7);
meshz(P);
title('裁剪后的网图');
colormap([0 0 1]);

%% 柱面图
figure(3);
x = 0:pi/20:pi*3;
r = 5 + cos(x);
[a,b,c] = cylinder(r,60);
mesh(a,b,c);

%% 旋转柱面图
figure(4);
t = 0:pi/12:3*pi;
r = abs(exp(-0.25*t).*sin(t));
[X,Y,Z] = cylinder(r,70);
mesh(X,Y,Z);
colormap([1 0 1]);

%% 球面图
figure(5)
[a,b,c] = sphere(60);
t = abs(c);
surf(a,b,c,t);
axis('equal');
%axis('square');
colormap('cool');





  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值