1. Simple Parametrization. Think of a parametric surface in as a quilt consisting of many smooth patches. A smooth surface patch is the 2-dimensional analogue in of a 1-dimensional curve in the plane, namely, a continuous function f: D -> , where D is a region in . A parametric surface is the union of a collection of smooth surface patches.
Example 1. It is simple to parametrize a plane with scalar equation ax + by + cz = d, Consider such a plane with c != 0. It is then possible to solve for z in terms of x and y: z = . A natural parametrization of the plane is then
(1) x = u, y = v, z = f(u, v) = .
In terms of a parametric vector function r: -> this takes the form
(2) r(u, v) = u i + v j + k.
Mathematica can graph a parametric surface by means of its built-in graphics command ParametricPlot3D. The following routine illustrates this for the plane 2x + 4y - 5z = 20. To plot other planes, simply change the assignments of the coefficients a, b, c, and d. (See the notebook Planes as Surfaces.) To see Mathematica's default plot, execute the following routine.
In[1]:=
a := 2;
b := 4;
c := -5;
d := 20;
plane = ParametricPlot3D[{u, v, (d - a*u - b*v)/c},
{u, -2, 2}, {v, -2, 2},
AxesLabel -> {x, y, z}]
As before, coordinate axes provide additional orientation. The following routine creates a graphics object called coordaxes with red coordinate axes over a portion of appropriate to the graph of 2x + 4y - 5z = 20. Activate the routine as usual by hitting the Enter key after placing the cursor at the end.
In[6]:=
coordaxes = Graphics3D[{ RGBColor[1, 0, 0],
Line[{{-2, 0, 0}, {2, 0, 0}}],
Text["x", {2.2, 0, 0}],
Line[{{0, -2, 0}, {0, 2, 0}}],
Text["y", {0, 3, 0}],
Line[{{0, 0, -6}, {0, 0, 2}}],
Text["z", {0, 0, 2.2}] }]
To obtain a plot of the plane with the coordinate axes, ask Mathematica to show both plots. The following command carries that out. Try it!
In[8]:=
2. More general surfaces. A slight extension of the last section's approach provides a parametric representation for the graph of a function f: -> R. Just let x = u, y = v, and z = f(u, v). The vector parametrization is then
r(u, v) = u i + v j + f(u, v) k,
where u and v range over an appropriate domain D of the xy-plane.
In[9]:=
ParametricPlot3D[{r*Cos[θ], r*Sin[θ], 2*(r*Cos[θ] +
r*Sin[θ])}, {r, 0, 1},
{θ, 0, 2*Pi}]
As before, you may want to include coordinate axes. The following routine is just the above coordaxes, with some slight editing to display a more appropriate part of the axes. Execute it to create the axes.
In[10]:=
coords2 = Graphics3D[{RGBColor[1,0,0],
Line[{{-1, 0, 0}, {1, 0, 0}}],
Text["x", {1.2, 0, 0}],
Line[{{0, -1, 0}, {0, 2, 0}}],
Text["y", {0, 2.2, 0}],
Line[{{0, 0, -3}, {0, 0, 3}}],
Text["z", {0, 0, 3.2}]
}]
As before, display the plot of the part of the plane inside the cylinder with the axes by asking Mathematica to show you the second-to-last plot (of the plane) and the object coords2.
In[11]:=
Show[%%, coords2]
3. Surface Area. Mathematica is a convenient tool for checking calculations of ||× ||, whose integral gives the surface area of a paraametric surface patch S with parametrizing vector function r: D -> . The following examples illustrate that.
Example 3. Find the area of the part of the plane z = 3 x - 2 y that lies inside the cylinder + = 4.
Solution. As in Exercise 4 above, it is natural to parametrize the surface as
X(r, θ) = r cos θ i +r sin θ j + (3 r cos θ - 2 r sin θ) k, r ∈ [0, 2], θ ∈ [0, 2π].
The following Mathematica routine calculates = and =. Try it!
In[12]:=
X[r_, θ_] := {r*Cos[θ], r*Sin[θ],
3*r*Cos[θ] - 2*r*Sin[θ]}
Xr = D[X[r, θ], r]
Xtheta = D[X[r, θ], θ]
Out[13]=
Out[14]=
To calculate the cross product of the two partial derivatives of X with respect to r and θ, previous versions of Mathematica required use of a special package, but now the built-in command Cross is available without further work. The next routine carries out the calculation. Execute it and compare to your hand calculation.
In[15]:=
dS := Cross[Xr, Xtheta]
dS
Out[16]=
The output is not in simplest form, so ask Mathematica to simplify it as much as it can by executing the following command:
In[17]:=
Simplify[dS]
Out[17]=
Finally, the area of the given surface is the double integral of the length of that cross product over the rectangular domain D = [0, 2] × [0, 2π]. The following little routine uses the fact that the length of the vector dS is just . Try it!
In[18]:=
dA := Sqrt[Dot[dS, dS]]
dA
Out[19]=
Again, the complexity of this expression prompts a request for simplication:
In[20]:=
Simplify[dA]
Out[20]=
Impressive programming, isn't it? Since we have not specified an allowable range of values for the variable r, Mathematica can't express the square root of in a simpler form. Once we specify the region of integration over which to evaluate the double integral of dA, Mathematica can and does provide a simple answer. Try the following!
In[21]:=
Integrate[dA, {r, 0, 2}, {θ, 0, 2 Pi}]
Out[21]=
Converted by Mathematica (June 24, 2003)