%% ================================================================
% Circular cylinder.
% ----------------------------------------------------------------
% John Kerl
% Math 537A
% 2007-11-27
% ----------------------------------------------------------------

function [x, y, z, ds, dt] = pipesetup()
ymin     =  -5.0;
ymax     =   5.0;
ny       =  50;
dy       = (ymax-ymin)/ny;

thetamin =   0.0;
thetamax =   2.0*pi;
ntheta   =  50;
dtheta   = (thetamax-thetamin)/ntheta;

% Extend the theta by one dtheta unit to avoid having a slit in the
% plotted surface.
[paramy,theta] = meshgrid(ymin:dy:ymax, thetamin:dtheta:thetamax+dtheta);

% xxx comment here
%
% >> [a,b]=meshgrid(1:4,5:8)
%
% a =
%
%      1     2     3     4
%      1     2     3     4
%      1     2     3     4
%      1     2     3     4
%
%
% b =
%
%      5     5     5     5
%      6     6     6     6
%      7     7     7     7
%      8     8     8     8

%% Apply the parameterization to obtain R^3 coordinates
x = cos(theta);
y = paramy;
z = sin(theta);
ds = dy;
dt = dtheta;
