Home > demos > achex > hexgeo.m

hexgeo

PURPOSE ^

rectangle with upper edge made up of three pieces

SYNOPSIS ^

function geo=hexgeo(lx,ly)

DESCRIPTION ^

 rectangle with upper edge made up of three pieces 
 with middle from -lx to lx and offset ly

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

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

Generated on Wed 15-Aug-2012 12:53:02 by m2html © 2005