%
% Computes the area of the shell taken by cutting the torus given by
%    (x - 2)^2 + y^2 = 1
% parallel to the y-axis at x.
%
function a = areaShell(x)

% Area of the shell at x is 2*pi*x*ht(x)  
% where ht(x) is the height of the shell at x

height = 2*sqrt(1 - (x - 2).^2);
a = 2*pi*x.*height;