function [x , y , nc] = MassCoords (xyC , b , h)

% ... berechnet Polygon (Koordinaten werden in x und y 
% abgeliefert, nc ist die Anzahl der Polygonpunkte) eines
% Rechtecks mit der Breite b und der Hoehe h, dessen 
% Mittelpunkt durch die Koordinaten xyC bestimmt ist.
% Das Polygon startet im Mittelpunkt.

b2   = b/2 ;
h2   = h/2 ;
x(1) = xyC(1) ;
y(1) = xyC(2) ;
x(2) = xyC(1) ;
y(2) = xyC(2)+h2 ;
x(3) = xyC(1)+b2 ;
y(3) = xyC(2)+h2 ;
x(4) = xyC(1)+b2 ;
y(4) = xyC(2)-h2 ;
x(5) = xyC(1)-b2 ;
y(5) = xyC(2)-h2 ;
x(6) = xyC(1)-b2 ;
y(6) = xyC(2)+h2 ;
x(7) = xyC(1) ;
y(7) = xyC(2)+h2 ;
x(8) = xyC(1) ;
y(8) = xyC(2)-h2 ;
nc   = 8 ;
