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

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

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

hmr = h - r ;     
bmr = b - r ;
nrx = round (nr/(1+h/b)) ;  % Anzahl Elemente obere Kante
nry = nr - nrx ;            % Anzahl Elemente rechte Kante  

nkv   = 2*nv+1 ;   % Anzahl Knoten vertikal
nkr   = 2*nr+1 ;   % Anzahl Knoten Viertelkreis
ikro  = 2*nrx+1 ;  % Knotennummer rechte obere Ecke
nkoff = nkv+nv+1 ; % Knotennummernoffset benachbarter Element-Spalten 

y  = h ;
dy = hmr/(nv*2) ;
for i=1:nkv
    xy(i,1) = 0. ;
    xy(i,2) = y  ;
    y = y - dy ;
end   % linke Spalte

dx = b/(nrx*2) ;
x  = dx ;
imk = nkv+1 ;
irk = nkoff+1 ;
for i=1:nrx
    xy(imk,1) = x ;
    xy(imk,2) = h ;
    imk = imk+nkoff ;
    x = x+dx ;
    xy(irk,1) = x ;
    xy(irk,2) = h ;
    irk = irk+nkoff ;
    x = x+dx ;
end   % obere Kante

dy = h/(nry*2) ;
y  = h-dy ;
for i=1:nry
    xy(imk,1) = b ;
    xy(imk,2) = y ;
    imk = imk+nkoff ;
    y = y-dy ;
    xy(irk,1) = b ;
    xy(irk,2) = y ;
    irk = irk+nkoff ;
    y = y-dy ;
end   % rechte Kante

dphi = pi/(4*nr) ;
phi  = dphi ;
jmo  = nkv+1 ;
jmu  = jmo+nv ;
jro  = nkoff+1 ;
jru  = jro+nkv-1 ;
for i=1:nr
    xy(jmu,1) = r*sin(phi) ;
    xy(jmu,2) = r*cos(phi) ;
    dx = (xy(jmo,1)-xy(jmu,1))/nv ;
    dy = (xy(jmo,2)-xy(jmu,2))/nv ;
    x  = xy(jmo,1)-dx ;
    y  = xy(jmo,2)-dy ;
    for j=jmo+1:jmu-1
        xy(j,1) = x ;
        xy(j,2) = y ;
        x = x-dx ;
        y = y-dy ;
    end   % Mittelpunkte
    jmo = jmo+nkoff ;
    jmu = jmu+nkoff ;
    phi = phi+dphi ;
    xy(jru,1) = r*sin(phi) ;
    xy(jru,2) = r*cos(phi) ;
    dx = (xy(jro,1)-xy(jru,1))/(nv*2) ;
    dy = (xy(jro,2)-xy(jru,2))/(nv*2) ;
    x  = xy(jro,1)-dx ;
    y  = xy(jro,2)-dy ;
    for j=jro+1:jru-1
        xy(j,1) = x ;
        xy(j,2) = y ;
        x = x-dx ;
        y = y-dy ;
    end   % rechte Randpunkte
    jro = jro+nkoff ;
    jru = jru+nkoff ;
    phi = phi+dphi ;
end

kl  = 1 ;
iel = 1 ;
for i=1:nr
   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