creates a "square" cell INPUT z0 center of the square w_block width of the block (square) style plot style (as in regular plot function) isfill fill or not the square OUTPUT fig square basis figure $Id: mk_sqr.m,v 1.1 2004/05/12 16:22:59 dalai Exp $
0001 % creates a "square" cell 0002 % 0003 % INPUT 0004 % z0 center of the square 0005 % w_block width of the block (square) 0006 % style plot style (as in regular plot function) 0007 % isfill fill or not the square 0008 % 0009 % OUTPUT 0010 % fig square basis figure 0011 % 0012 % 0013 % $Id: mk_sqr.m,v 1.1 2004/05/12 16:22:59 dalai Exp $ 0014 0015 function fig = mk_sqr(z0,w_block,style,isfill) 0016 0017 lattice = sqrt(2)/2*w_block; 0018 square = z0 + exp(i*pi*((1+2*(0:4))/4)).'*lattice ; 0019 0020 plot( square , style); 0021 if isfill 0022 fill ( real(square), imag(square) , style); 0023 end 0024 axis square;