Parametrizing the sphere and the torus

Parametrizing the top half of the sphere by graphing over the unit disk in the horizontal plane

Psi[{s_,t_}]={s,t,Sqrt[1-s^2-t^2]}
plot1=ParametricPlot3D[Psi[{s,t}],{t,-1,1},{s,-1,1}]

Parametrizing the sphere (minus north and south pole) by lattitude and longitude.  This is essentially what we mean by spherical coordinates, except we measure latitude by angle with the equator rather than with the north pole.

Psi[{s_,t_}]={Cos[t]Cos[s],Cos[t]Sin[s],Sin[t]}
ParametricPlot3D[Psi[{s,t}],{t,-Pi/2,Pi/2},{s,-Pi,Pi}]

Parametrizing the sphere with cylindrical coordinates.

Psi[{s_,t_}]={Sqrt[1-t^2]Cos[s],Sqrt[1-t^2]Sin[s],t}
plot1=ParametricPlot3D[Psi[{s,t}],{t,-1,1},{s,-Pi,Pi}]

Parametrizing by projecting onto a cylinder and then unrolling it.  This time I also draw in the image of a typical line by Psi.

Psi[{s_,t_}]={Cos[s],Sin[s],t}/Sqrt[1+t^2]
plot1=ParametricPlot3D[Psi[{s,t}],{s,0,2Pi},{t,-6,6},Mesh->50]
gamma[t_]={1+t,t/3}
plot2=ParametricPlot3D[Psi[gamma[t]],{t,0,10Pi}];
Show[plot1,plot2]

Parametrizing all but the north pole of the sphere by stereographi c projection

Psi[{s_,t_}]={0,0,1}+2{s,t,-1}/(1+s^2+t^2)
plot1=ParametricPlot3D[Psi[{s,t}],{s,-5,5},{t,-5,5},Mesh->50,PlotRange->All]
gamma[t_]={1+t,t/3}
plot2=ParametricPlot3D[Psi[gamma[t]],{t,-10,10}];
Show[plot1,plot2];

Now I turn to a more complicated surface--the torus.  This one is a little easier to describe by parametrizing than as a level set.

Psi[{s_,t_}]={Cos[s](2+Cos[t]),Sin[s](2+Cos[t]),Sin[t]}
gamma[t_]={1+t,Pi t};
plot1=ParametricPlot3D[Psi[{s,t}],{s,0,2Pi},{t,0,2Pi},Mesh->50]
plot2=ParametricPlot3D[Psi[gamma[t]],{t,0,50},PlotPoints->500];
Show[plot1,plot2];

Nevertheless here it is again as a level set.

rho[{x_,y_,z_}]=(x^2+y^2+z^2+3)^2-16(x^2+y^2)
plot1=ContourPlot3D[rho[{x,y,z}]==0,{x,-3,3},{y,-3,3},{z,-3,3}]

The gradient of rho gives us a normal vector to each point in the surface.  The columns of the Jacobian matrix for Psi span the tangent space at each point.  The fact that grad rho is orthogonal to the columns of JPsi amounts to the matrix equation grad rho( Psi(s,t) ) JPsi(s,t) = 0 (which I have mathematica verify).  This fact follow from differentiating the identity rho( Psi(s,t) ) = 0 and applying the chain rule.

MatrixForm[gradrho[{x_,y_,z_}]=D[rho[{x,y,z}],{{x,y,z}}]]
MatrixForm[JPsi[{s_,t_}] = D[Psi[{s,t}],{{s,t}}]]
Simplify[gradrho[Psi[{s,t}]].JPsi[{s,t}]]

To illustrate, let me draw the tangent plane and normal lines for the surface at the point p = Psi[Pi/4,Pi/4].  

First a warning:  as I defined them in class, the tangent and normal spaces to a hypersurface at a given point are vector subspaces of R^n; in particular, they pass through the origin.  The tangent plane and normal line are drawn here so that they instead pass through the given point p on the torus--i.e. what I really draw is the tangent space translated by p.  One generally does things this way to facilitate an easy visual comparison of the surface with the tangent space.

Note that the parametrization of the (translated) tangent plane is just given by the linear approximation of Psi (plot2).  Alternatively, the tangent plane is the level set of the linear approximation of the defining function rho (plot3).

p = Simplify[Psi[{Pi/4,Pi/4}]]
plot2 = ParametricPlot3D[Psi[{Pi/4,Pi/4}]+JPsi[{Pi/4,Pi/4}].({s,t}-{Pi/4,Pi/4}),{s,-4,4},{t,-4,4}];
plot3 =ContourPlot3D[rho[p] + gradrho[p].({x,y,z}-p)==0,{x,-3,3},{y,-3,3},{z,-3,3}];
plot4=ParametricPlot3D[Psi[{Pi/4,Pi/4}]+t gradrho[Psi[{Pi/4,Pi/4}]],{t,-2,2}];
Show[plot1,plot2,plot4]