%% ================================================================
% Hyperboloid of one sheet, top sheet, with graph coordinates.
% ----------------------------------------------------------------
% John Kerl
% Math 537A
% 2007-11-27
% ----------------------------------------------------------------

function [x, y, z, ds, dt] = hyp2topsetup()
smin = -4.0;
smax =  4.0;
ns   = 64;
ds   = (smax-smin)/ns;

% t sweeps down from the north pole.
tmin = -4.0;
tmax =  4.0;
nt   = 64;
dt   = (tmax-tmin)/nt;

[s,t] = meshgrid(smin:ds:smax, tmin:dt:tmax);

%% Apply the parameterization to obtain R^3 coordinates
x  = s;
y  = t;
z  = sqrt(1 + s.^2 + t.^2);

%z = sqrt(1 + r.^2)
%r = sqrt(1 + z.^2)

