clc;
clear;
close all;

x = [0 1 1 -2 -1  0];
y = [0 0 1  2 -1 -1];

A = CalcArea(x, y);

figure;
fill(x, y, 'yellow');

xlim([-4 4]);
ylim([-4 4]);
grid on;
axis equal;

title(['Area = ' num2str(A)]);
