function [ne , nk , xy , km] = RectnetSV16 (b , h , nh , nv)

nk = (2*nv+1) * (nh+1) + (nv+1) * nh ;
ne = nv * nh ;

xy = zeros (nk,2) ;
km = zeros (ne,8) ;

ebh = b/(nh*2) ;
eh  = h/nv ;
ehh = eh/2 ;
xx  = 0. ;
ii  = 1 ;

for i=1:nh+1
	yy = h ;
	for j=1:nv*2+1
	  xy(ii,1) = xx ;
	  xy(ii,2) = yy ;
	  ii = ii+1  ;
	  yy = yy-ehh ;
    end
	xx = xx+ebh ;
	if (i < nh+1)
	    yy = h ;
 	    for j=1:nv+1
	      xy(ii,1) = xx ;
	      xy(ii,2) = yy ;
	      ii = ii+1  ;
	      yy = yy-eh ;
        end
    end
	xx = xx+ebh ;
end

kl  = 1 ;
iel = 1 ;
for i=1:nh
   kmd = kl  + 2*nv + 1 ;
   kr  = kmd +   nv + 1 ;
   for j=1:nv
	    km(iel,1) = kr ;
	    km(iel,2) = kr+2 ;
	    km(iel,3) = kl ;
	    km(iel,4) = kl+2 ;
	    km(iel,5) = kr+1 ;
	    km(iel,6) = kl+1 ;
	    km(iel,7) = kmd ;
	    km(iel,8) = kmd+1 ;
	    iel = iel+1 ;
	    kl  = kl +2 ;
	    kmd = kmd+1 ;
	    kr  = kr +2 ;
   end
   kl = kmd+1 ;
end