%% ================================================================
% Surface of revolution of f(y) with y/theta coordinates.
% ----------------------------------------------------------------
% John Kerl
% Math 537A
% 2007-11-27
% ----------------------------------------------------------------

function [x, y, z, ds, dt] = sorsetup()
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);

%% Apply the parameterization to obtain R^3 coordinates.  See the file
% sorG.m which in turn calls sorf.m.
[x,y,z] = sorG(paramy, theta);
ds = dy;
dt = dtheta;
