|
这里有画三维图的程序- clear;clc;close all
- for b=0:99
- m(:,:,b+1)=transpose(imread(sprintf('%d.bmp',b)));
- end
- m=double(m);
- m1=m(1:4:512,1:4:512,:);
- m1(m1==0)=88;
- m1(m1==1)=0;
- ms=smooth3(m1);
- hiso=patch(isosurface(ms,5),'FaceColor',[1,.75,.65],'EdgeColor','none');
- hcap=patch(isocaps(m1,5),'FaceColor','interp','EdgeColor','none');
- colormap('default');
- view(45,30);
- axis tight
- grid;
- daspect([1,1,.4]);
- lightangle(45,30); lighting phong
- isonormals(ms, hiso);
- set(hcap,'AmbientStrength',.6)
- set(hiso,'SpecularColorReflectance',0,'SpecularExponent',50)
- rotate3d
- colormap spring
复制代码 |
评分
-
1
查看全部评分
-
|