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.
 
 
 
 

70 lines
1.8 KiB

nelx = 1;
nely = 1;
microx = 100;
% microx_scalar = 1/8; x_offset = 1; % 200
% microx_scalar = 1/2; x_offset = 4; % 50
microx_scalar = 1; x_offset = 2; % 100
% microx_scalar = 1/16; x_offset = 2; % 100
% microx_scalar = 1/4; x_offset = 2; % 25
microx = microx * microx_scalar; nelx = nelx / microx_scalar; nely = nely / microx_scalar;
% clf
lx = 1; lx = lx * microx_scalar;
dx = lx/microx;
% figure;
hold on;
[gx,gy]=meshgrid(lx/2:nelx*microx+lx/2, lx/2:nely*microx+lx/2);
% plot(gx,gy,'y');
% for i = 0:nelx
% idx = i*microx+1;
% plot(gx(:,idx),gy(:,idx),'k','linewidth',2);
% % plot(gx(:,idx),gy(:,idx),'color',[0,0.75,1],'linewidth',1);
% % plot(gx(:,idx),gy(:,idx),'color',[0.5,0.5,0.5],'linewidth',1);
% end
% for j = 0:nely
% idx = j*microy+1;
% plot(gx(idx,:),gy(idx,:),'k','linewidth',2);
% % plot(gx(idx,:),gy(idx,:),'color',[0,0.75,1],'linewidth',1);
% % plot(gx(idx,:),gy(idx,:),'color',[0.5,0.5,0.5],'linewidth',1);
% end
% axis tight; axis off;
%axis([0 nelx 0 nely]);
% set(gcf,'color',[0.5,0.5,0.5]);%set background color = gray;
% caxis([0 1]);
% axis equal; axis off; drawnow;
% x = imread('sketch_connect_structures.png');
% nelx = 4;
% nely = 1;
% microx = 50;
% microy = 50;
nx = nelx*microx;
ny = nely*microx;
%
% % figure; imagesc(1-x);
% hold on;
% [gx,gy] = meshgrid(0:nelx*microx,0:nely*microy);
%
% % micro grid
% for i = 1:nx+1
% plot(gx(:,i),gy(:,i),'--','Color','k','linewidth',0.5);
% end
% for j = 1:ny+1
% plot(gx(j,:),gy(j,:),'--','Color','k','linewidth',0.5);
% end
%
% % macro grid
for i = 0:nelx
idx = i*microx+1;
plot(gx(:,idx),gy(:,idx),'k','linewidth',1);
end
for j = 0:nely
idx = j*microx+1;
plot(gx(idx,:),gy(idx,:),'k','linewidth',1);
end
caxis([0 1]); axis equal; axis off; drawnow;
% 2333;