demo06

fprintf('--------------- fc_hypermesh.demos.demo06\n')
fprintf('  Mapping the 3d unit hypercube\n')
fprintf('---------------\n')

Map=@(q) [q(1,:)+ sin(4*pi*q(2,:)); 10*q(2,:); q(3,:)+cos(4*pi*q(2,:))];
Oh=fc_hypermesh.OrthMesh(3,[4,25,4],'mapping',Map,'type','orthotope');

close all
% plot the main mesh
figure(1)
Oh.plotmesh('legend',true)
xlabel('x');ylabel('y');zlabel('z');axis image;axis equal;
% plot the 2-face meshes
figure(2)
Oh.plotmesh('m',2,'legend',true)
xlabel('x');ylabel('y');zlabel('z');axis image;axis equal;
% plot the 1-face meshes
figure(3)
Oh.plotmesh('m',2,'color',[0.8,0.8,0.8],'EdgeAlpha',0.2, 'FaceColor','none')
hold on
Oh.plotmesh('m',1,'Linewidth',2,'legend',true)
xlabel('x');ylabel('y');zlabel('z');axis image;axis equal;
% plot the 0-face meshes
figure(4)
Oh.plotmesh('m',1,'color','k')
hold on
Oh.plotmesh('m',0,'legend',true)
xlabel('x');ylabel('y');zlabel('z');axis image;axis equal;

fc_tools.graphics.DisplayFigures()
--------------- fc_hypermesh.demos.demo06
  Mapping the 3d unit hypercube
---------------
demo06-1.pngdemo06-2.pngdemo06-3.pngdemo06-4.png