%Catenoid
[u,v] = meshgrid(-2:.1:2,0:pi/10:2*pi);
x = cosh(u).*cos(v);
y = -cosh(u).*sin(v);
z = u;
figure(1); clf;
surf(x,y,z);
title('Catenoid x = cosh(u)cos(v), y = -sinh(u)cos(v), z = u');
xlabel('x');ylabel('y');zlabel('z');

[U,V] = meshgrid(-1:.2:1,0:pi/10:pi/2);
Nx = sech(U).*cos(V);
Ny = -sech(U).*sin(V);
Nz = -tanh(U);
X = cosh(U).*cos(V);
Y = -cosh(U).*sin(V);
Z = U;
figure(2);clf;
surfl(x,y,z);hold on;
quiver3(X,Y,Z,Nx,Ny,Nz);hold off;
%view(70,15);
title('Catenoid with normal vectors over -1 < u < 1, 0 < v < \pi/2');
xlabel('x');ylabel('y');zlabel('z');

[u,v] = meshgrid(-1:.1:1,0:pi/10:pi/2);
G1= sech(u).*cos(v);
G2 = -sech(u).*sin(v);
G3 = -tanh(u);
figure(3);clf;
surfl(G1,G2,G3);
axis([-3,3,-3,3,-3,3]);hold on;
%view(70,15);
%view(-85,30);axis equal;
plot3(0,0,0,'*');hold off;
title('Gauss map of Catenoid over -1 < u < 1, 0 < v < \pi/2');
xlabel('x');ylabel('y');zlabel('z');

r = 1.75; s = .95*pi;
xx = cosh(r)*cos(s);
yy = -cosh(r)*sin(s);
zz = r;
e1x = tanh(r)*cos(s);
e1y = -tanh(r)*sin(s);
e1z = sech(r);
e2x = -sin(s);
e2y = -cos(s);
e2z = 0;
e3x = sech(r)*cos(s);
e3y = -sech(r)*sin(s);
e3z = -tanh(r);
figure(4);clf;
surfl(x,y,z);hold on;
quiver3(xx,yy,zz,e1x,e1y,e1z);
quiver3(xx,yy,zz,e2x,e2y,e2z);
quiver3(xx,yy,zz,e3x,e3y,e3z);
hold off;
view(-39,8);
title('Catenoid with an orthonormal frame');
xlabel('x');ylabel('y');zlabel('z');

