% Zeichnen eines verformten 2D-Fachwerks
function drawfw2duv (xy , km , kr , bk , uv , adds)

if nargin < 6 adds = '' ; end

[ne,n] = size (km) ;
clf ;

% Elemente (Staebe) des unverformten Systems:
slen = 0 ;
for i=1:ne
   k1 = km(i,1) ;
   k2 = km(i,2) ;
   plot ([xy(k1,1) xy(k2,1)],[xy(k1,2) xy(k2,2)] , ':g') ;
   slen = slen + sqrt ((xy(k1,1)-xy(k2,1))^2 + (xy(k1,2)-xy(k2,2))^2) ;
   hold on ;
end

maxuv = max(max(abs(uv))) ;
fac   = slen/(8*ne*maxuv) ; 

% Zeichnen des unverformten Systemes:
drawfw2d (xy+uv*fac , km , kr , bk , adds) ;