Thursday, April 21, 2011

How to visualize 3D results of phase field simulation?



Following is a matlab script I used to visualize 3D result of phase field simulation. If someone has better choice, please let me know.

##########################
figure
data = timekk;
data = smooth3(data,'box',5);
isoval = 0.0;
h = patch(isosurface(data,isoval),...
'FaceColor','blue',...
'EdgeColor','none',...
'AmbientStrength',.2,...
'SpecularStrength',.7,...
'DiffuseStrength',.4);
isonormals(data,h)
patch(isocaps(data,isoval),...
'FaceColor','interp',...
'EdgeColor','none')
colormap winter
colorbar
daspect([1,1,1])
axis tight
view(3)
camlight right
camlight left
set(gcf,'Renderer','zbuffer');
lighting phong
saveas(gcf,f3d,'jpg')
#############################



No comments:

Post a Comment