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

📄 ex2416.m

📁 这是matlab的关于3维绘图方面的东西
💻 M
字号:
%例24-16 设置多个片块模型的颜色
%Ex24-16 set colors in multi-patches model
clear
close all
Vm=[0 0 0;1 0 0;1 0 1;0 0 1;0 1 1;1 1 1;1 1 0];
Fm=[1 2 3 4;3 4 5 6;6 3 2 7];
subplot(3,2,1)
patch('Vertices',Vm,'Faces',Fm,'FaceVertexCData',rand(1,1),'FaceColor','flat')
view([30,30]);title('set uniform index-color')
subplot(3,2,2)
patch('Vertices',Vm,'Faces',Fm,'FaceVertexCData',rand(1,3),'FaceColor','flat')
view([30,30]);title('set uniform RGB-color')
subplot(3,2,3)
patch('Vertices',Vm,'Faces',Fm,'FaceVertexCData',rand(size(Vm,1),1),'FaceColor','interp')
view([30,30]);title('assign multi-index-color to Vertices')
subplot(3,2,4)
patch('Vertices',Vm,'Faces',Fm,'FaceVertexCData',rand(size(Vm,1),3),'FaceColor','interp')
view([30,30]);title('assign multi-RGB-color to Vertices')
subplot(3,2,5)
patch('Vertices',Vm,'Faces',Fm,'FaceVertexCData',rand(size(Fm,1),1),'FaceColor','flat')
view([30,30]);title('assign multi-index-color to Faces')
subplot(3,2,6)
patch('Vertices',Vm,'Faces',Fm,'FaceVertexCData',rand(size(Fm,1),3),'FaceColor','flat')
view([30,30]);title('assign multi-RGB-color to Faces')

⌨️ 快捷键说明

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