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
11 months ago
|
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
|