rectangle with upper edge made up of three pieces with middle from -lx to lx and offset ly
0001 function geo=hexgeo(lx,ly) 0002 % rectangle with upper edge made up of three pieces 0003 % with middle from -lx to lx and offset ly 0004 if (lx<0)||(lx>=1) fprintf('recx error: lx out of bounds'); end 0005 if (ly<-1) fprintf('recx error: ly out of bounds'); end 0006 x=[-1 -1 1 1 lx -lx]; y=[1 -1 -1 1 1+ly 1+ly]; geo=polygong(x,y); 0007 return