You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.1 KiB
40 lines
1.1 KiB
function plot_ani(aPhys,bPhys,cPhys)
|
|
tic
|
|
[nz,ny,nx]=size(cPhys);
|
|
figure('Name','ani_structure')
|
|
axis equal;
|
|
axis off;
|
|
for i=1:nx
|
|
for j=1:ny
|
|
for k=1:nz
|
|
a = aPhys(k,j,i);
|
|
b = bPhys(k,j,i);
|
|
% c = (cPhys(k,j,i)+0.6);%应该大于1才会越大
|
|
c = cPhys(k,j,i);
|
|
centerx=i-1/2;
|
|
centery=j-1/2;
|
|
centerz=k-1/2;
|
|
[x,y,z]=meshgrid(linspace(-1/2+centerx,1/2+centerx,25),linspace(-1/2+centery,1/2+centery,25),linspace(-1/2+centerz,1/2+centerz,25));
|
|
p=cos(2*pi*(x-centerx))+cos(2*pi*(y-centery))*a+cos(2*pi*(z-centerz))*b-c;
|
|
% view(2)
|
|
hold on
|
|
isosurface(x,y,z,p,0)
|
|
isocaps(x,y,z,p,0)
|
|
end
|
|
end
|
|
end
|
|
|
|
view(0,0); %视角的控制
|
|
|
|
% set(gca, 'ZDir','reverse');
|
|
% colormap([0 1 0]); %绘图颜色红色
|
|
colormap([18 184 246]./256);
|
|
% brighten(0.5); %增亮
|
|
lighting phong; %光照模式
|
|
camlight right; %光源位置
|
|
material metal
|
|
toc
|
|
|
|
% set(gcf,'paperpositionmode','auto');
|
|
% print('-depsc','direct_fittingALL_before.eps');
|
|
end
|