function Area = MC_ellipse(nPoints)
nInside = 0;
for i = 1 : nPoints;
x = 4 * rand - 2; % Number between -2 and 2
y = 2 * rand - 1; % Number between -1 and 1
if ( (x/2)^2 + y^2 < 1 ) nInside = nInside + 1;
end;
end;
AreaRectangle = 8;
Area = AreaRectangle * nInside / nPoints;
Exact = 2*pi;
fprintf('N=%5d Volume=%.5g Exact=%.5g Error=%.5g\n', ...
nPoints, Area, Exact, abs(Exact - Area) );