function plocha = plocha_polygonu(body)
% vypocet plochy polygonu

[R,C] = size(body);
plocha = 0;
if R < 3
    return;
end
for i = 1:R-1
    plocha = plocha + (body(i+1,1)-body(i,1)) ...
                    * (body(i+1,2)+body(i,2));
end
plocha = plocha + (body(1,1)-body(R,1))*(body(1,2)+body(R,2));
plocha = abs(plocha/2);