demo05

fprintf('--------------- fc_hypermesh.demos.demo05\n')
fprintf('  Mapping the 2d unit hypercube\n')
fprintf('---------------\n')

Oh=fc_hypermesh.OrthMesh([30,10],'mapping',@(q) [20*q(1,:); 2*(2*q(2,:)-1+cos(2*pi*q(1,:)))]);
% plot the main mesh

close all

figure(1)
Oh.plotmesh('legend',true)
axis equal;xlabel('x');ylabel('y')
% plot the 1-face meshes
figure(2)
Oh.plotmesh('color',[0.8,0.8,0.8])
hold on
Oh.plotmesh('m',1,'Linewidth',2,'legend',true)
axis equal;xlabel('x');ylabel('y');
% plot the 0-face meshes
figure(3)
Oh.plotmesh('m',1,'color','k')
hold on
Oh.plotmesh('m',0,'legend',true)
axis equal;xlabel('x');ylabel('y');

fc_tools.graphics.DisplayFigures()
--------------- fc_hypermesh.demos.demo05
  Mapping the 2d unit hypercube
---------------
demo05-1.pngdemo05-2.pngdemo05-3.png